summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorMiao Xie2013-02-21 07:32:52 +0100
committerChris Mason2013-02-21 14:11:43 +0100
commitdc81cdc58ad2f413b96b9004f8d681e5dc554473 (patch)
tree71f87fc0e172167755f1f572af3b77cb7aff46a7 /fs/btrfs/ctree.h
parentBtrfs: fix wrong outstanding_extents when doing DIO write (diff)
downloadkernel-qcow2-linux-dc81cdc58ad2f413b96b9004f8d681e5dc554473.tar.gz
kernel-qcow2-linux-dc81cdc58ad2f413b96b9004f8d681e5dc554473.tar.xz
kernel-qcow2-linux-dc81cdc58ad2f413b96b9004f8d681e5dc554473.zip
Btrfs: fix remount vs autodefrag
If we remount the fs to close the auto defragment or make the fs R/O, we should stop the auto defragment. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3dcedfe4f759..ae8dcc406805 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -339,6 +339,7 @@ static inline unsigned long btrfs_chunk_item_size(int num_stripes)
* File system states
*/
#define BTRFS_FS_STATE_ERROR 0
+#define BTRFS_FS_STATE_REMOUNTING 1
/* Super block flags */
/* Errors detected */
@@ -1902,6 +1903,7 @@ struct btrfs_ioctl_defrag_range_args {
#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)
+#define btrfs_raw_test_opt(o, opt) ((o) & BTRFS_MOUNT_##opt)
#define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \
BTRFS_MOUNT_##opt)
/*