Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for testing
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3bbd7f66..f1b56eb 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -63,7 +63,8 @@
}
enum {
- Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent, Opt_err,
+ Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
+ Opt_alloc_start, Opt_err,
};
static match_table_t tokens = {
@@ -71,6 +72,7 @@
{Opt_nodatasum, "nodatasum"},
{Opt_nodatacow, "nodatacow"},
{Opt_max_extent, "max_extent=%s"},
+ {Opt_alloc_start, "alloc_start=%s"},
{Opt_err, NULL}
};
@@ -162,6 +164,18 @@
}
}
break;
+ case Opt_alloc_start:
+ if (info) {
+ char *num = match_strdup(&args[0]);
+ if (num) {
+ info->alloc_start =
+ btrfs_parse_size(num);
+ kfree(num);
+ printk("btrfs: allocations start at "
+ "%Lu\n", info->alloc_start);
+ }
+ }
+ break;
default:
break;
}