Btrfs: Add flush barriers on commit
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f1b56eb..9ab4086 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -64,13 +64,14 @@
enum {
Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
- Opt_alloc_start, Opt_err,
+ Opt_alloc_start, Opt_nobarrier, Opt_err,
};
static match_table_t tokens = {
{Opt_subvol, "subvol=%s"},
{Opt_nodatasum, "nodatasum"},
{Opt_nodatacow, "nodatacow"},
+ {Opt_nobarrier, "nobarrier"},
{Opt_max_extent, "max_extent=%s"},
{Opt_alloc_start, "alloc_start=%s"},
{Opt_err, NULL}
@@ -148,6 +149,12 @@
btrfs_set_opt(info->mount_opt, NODATASUM);
}
break;
+ case Opt_nobarrier:
+ if (info) {
+ printk("btrfs: turning off barriers\n");
+ btrfs_set_opt(info->mount_opt, NOBARRIER);
+ }
+ break;
case Opt_max_extent:
if (info) {
char *num = match_strdup(&args[0]);