aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-29 16:03:38 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit6f568d35a045dbb8a13fe71bfc32e85e39a986cb (patch)
treedf5cb5826dfb46a2514bfba34f8473dc65ea7081 /fs/btrfs/super.c
parent291d673e6a22d9c6834e939f66c7cfef90669021 (diff)
Btrfs: mount -o max_inline=size to control the maximum inline extent size
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f8a1016600b..a46300c4753 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -64,7 +64,7 @@ static void btrfs_put_super (struct super_block * sb)
enum {
Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
- Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
+ Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
};
static match_table_t tokens = {
@@ -73,6 +73,7 @@ static match_table_t tokens = {
{Opt_nodatacow, "nodatacow"},
{Opt_nobarrier, "nobarrier"},
{Opt_max_extent, "max_extent=%s"},
+ {Opt_max_inline, "max_inline=%s"},
{Opt_alloc_start, "alloc_start=%s"},
{Opt_ssd, "ssd"},
{Opt_err, NULL}
@@ -178,6 +179,22 @@ static int parse_options (char * options,
}
}
break;
+ case Opt_max_inline:
+ if (info) {
+ char *num = match_strdup(&args[0]);
+ if (num) {
+ info->max_inline =
+ btrfs_parse_size(num);
+ kfree(num);
+
+ info->max_inline = max_t(u64,
+ info->max_inline,
+ root->sectorsize);
+ printk("btrfs: max_inline at %Lu\n",
+ info->max_inline);
+ }
+ }
+ break;
case Opt_alloc_start:
if (info) {
char *num = match_strdup(&args[0]);