Thread (4 messages) 4 messages, 3 authors, 2012-07-24

Re: [PATCH v3 1/1] Btrfs: Check INCOMPAT flags on remount and add helper function

From: Li Zefan <hidden>
Date: 2012-07-23 01:16:02

quoted hunk ↗ jump to hunk
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
quoted hunk ↗ jump to hunk
index a0ee2f8..3a1a700 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3103,6 +3103,19 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
 			       struct btrfs_root *root, const char *function,
 			       unsigned int line, int errno);
 
+static inline void btrfs_chk_lzo_incompat(struct btrfs_root *root)

Isn't btrfs_set_lzo_incompat() is a better name?
+{
+	struct btrfs_super_block *disk_super;
+	u64 features;
+
+	disk_super = root->fs_info->super_copy;
+	features = btrfs_super_incompat_flags(disk_super);
+	if (!(features & BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO)) {
+		features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO;
+		btrfs_set_super_incompat_flags(disk_super, features);
+	}
+}
+
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help