summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik2010-09-21 20:21:34 +0200
committerChris Mason2010-10-29 15:26:36 +0200
commit88c2ba3b069f1e0f4694124d02985fa7620a19f1 (patch)
treee41859aca299e14e2658d75e2bf1ef2aea9ab077 /fs/btrfs/ctree.h
parentBtrfs: add support for mixed data+metadata block groups (diff)
downloadkernel-qcow2-linux-88c2ba3b069f1e0f4694124d02985fa7620a19f1.tar.gz
kernel-qcow2-linux-88c2ba3b069f1e0f4694124d02985fa7620a19f1.tar.xz
kernel-qcow2-linux-88c2ba3b069f1e0f4694124d02985fa7620a19f1.zip
Btrfs: Add a clear_cache mount option
If something goes wrong with the free space cache we need a way to make sure it's not loaded on mount and that it's cleared for everybody. When you pass the clear_cache option it will make it so all block groups are setup to be cleared, which keeps them from being loaded and then they will be truncated when the transaction is committed. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b155a0e49eeb..633e559e000e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1229,6 +1229,7 @@ struct btrfs_root {
#define BTRFS_MOUNT_DISCARD (1 << 10)
#define BTRFS_MOUNT_FORCE_COMPRESS (1 << 11)
#define BTRFS_MOUNT_SPACE_CACHE (1 << 12)
+#define BTRFS_MOUNT_CLEAR_CACHE (1 << 13)
#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)