From: Naohiro Aota <naota@xxxxxxxxx>
If we set nodatacow mount option after compress-force option,
we don't get compression disabling message.
===
$ sudo mount -o remount,compress-force,nodatacow /; dmesg|tail -n 3
[ 3845.719047] BTRFS info (device vda2): force zlib compression
[ 3845.719052] BTRFS info (device vda2): setting nodatacow
[ 3845.719055] BTRFS info (device vda2): disk space caching is enabled
===
Signed-off-by: Naohiro Aota <naota@xxxxxxxxx>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@xxxxxxxxxxxxxx>
---
fs/btrfs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d1c5b6d..d131098 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -462,8 +462,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
break;
case Opt_nodatacow:
if (!btrfs_test_opt(root, NODATACOW)) {
- if (!btrfs_test_opt(root, COMPRESS) ||
- !btrfs_test_opt(root, FORCE_COMPRESS)) {
+ if (btrfs_test_opt(root, COMPRESS)) {
btrfs_info(root->fs_info,
"setting nodatacow, compression disabled");
} else {
-- 1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html