summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorMitch Harder2012-07-24 19:58:43 +0200
committerChris Mason2012-07-25 22:14:31 +0200
commit2b0ce2c2909368d124a78a88e5c7106fdcba6221 (patch)
tree8a8e2f4de870c73174b9720d25f69e4ad5f27608 /fs/btrfs/super.c
parentMerge branch 'qgroup' of git://git.jan-o-sch.net/btrfs-unstable into for-linus (diff)
downloadkernel-qcow2-linux-2b0ce2c2909368d124a78a88e5c7106fdcba6221.tar.gz
kernel-qcow2-linux-2b0ce2c2909368d124a78a88e5c7106fdcba6221.tar.xz
kernel-qcow2-linux-2b0ce2c2909368d124a78a88e5c7106fdcba6221.zip
Btrfs: Check INCOMPAT flags on remount and add helper function
In support of the recently added capability to remount with lzo compression, provide a helper function to check the compression INCOMPAT flags when remounting with lzo compression, and set the flags if necessary. Also, implement the new helper function when defragmenting with explicit lzo compression and when setting the default subvolume. Signed-off-by: Mitch Harder <mitch.harder@sabayonlinux.org> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 26da344231ac..75ee2c7791f0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -401,6 +401,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
compress_type = "lzo";
info->compress_type = BTRFS_COMPRESS_LZO;
btrfs_set_opt(info->mount_opt, COMPRESS);
+ btrfs_set_fs_incompat(info, COMPRESS_LZO);
} else if (strncmp(args[0].from, "no", 2) == 0) {
compress_type = "no";
info->compress_type = BTRFS_COMPRESS_NONE;