summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChristoph Hellwig2009-10-14 15:24:59 +0200
committerChris Mason2009-10-14 16:32:49 +0200
commite244a0aeb6a599c19a7c802cda6e2d67c847b154 (patch)
tree392d8d48c4e6676a552230135ad448d522007ece /fs/btrfs/ctree.h
parentBtrfs: properly wait log writers during log sync (diff)
downloadkernel-qcow2-linux-e244a0aeb6a599c19a7c802cda6e2d67c847b154.tar.gz
kernel-qcow2-linux-e244a0aeb6a599c19a7c802cda6e2d67c847b154.tar.xz
kernel-qcow2-linux-e244a0aeb6a599c19a7c802cda6e2d67c847b154.zip
Btrfs: add -o discard option
Enable discard by default is not a good idea given the the trim speed of SSD prototypes we've seen, and the carecteristics for many high-end arrays. Turn of discards by default and require the -o discard option to enable them on. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.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 dfd7e6fc66d3..e5dd628a526f 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1153,6 +1153,7 @@ struct btrfs_root {
#define BTRFS_MOUNT_FLUSHONCOMMIT (1 << 7)
#define BTRFS_MOUNT_SSD_SPREAD (1 << 8)
#define BTRFS_MOUNT_NOSSD (1 << 9)
+#define BTRFS_MOUNT_DISCARD (1 << 10)
#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)