aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-02 10:01:11 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit8f662a76c6af8eb367fa519e9bb9766040d9cea8 (patch)
tree3072a4d35c49e2c884f41d044dec4950bf95c3b3 /fs/btrfs/super.c
parente52ec0eb62e76ea584c8438ef92933e9b815db80 (diff)
Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for testing
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3bbd7f665694..f1b56eb77b1d 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -63,7 +63,8 @@ static void btrfs_put_super (struct super_block * sb)
63} 63}
64 64
65enum { 65enum {
66 Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent, Opt_err, 66 Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
67 Opt_alloc_start, Opt_err,
67}; 68};
68 69
69static match_table_t tokens = { 70static match_table_t tokens = {
@@ -71,6 +72,7 @@ static match_table_t tokens = {
71 {Opt_nodatasum, "nodatasum"}, 72 {Opt_nodatasum, "nodatasum"},
72 {Opt_nodatacow, "nodatacow"}, 73 {Opt_nodatacow, "nodatacow"},
73 {Opt_max_extent, "max_extent=%s"}, 74 {Opt_max_extent, "max_extent=%s"},
75 {Opt_alloc_start, "alloc_start=%s"},
74 {Opt_err, NULL} 76 {Opt_err, NULL}
75}; 77};
76 78
@@ -162,6 +164,18 @@ static int parse_options (char * options,
162 } 164 }
163 } 165 }
164 break; 166 break;
167 case Opt_alloc_start:
168 if (info) {
169 char *num = match_strdup(&args[0]);
170 if (num) {
171 info->alloc_start =
172 btrfs_parse_size(num);
173 kfree(num);
174 printk("btrfs: allocations start at "
175 "%Lu\n", info->alloc_start);
176 }
177 }
178 break;
165 default: 179 default:
166 break; 180 break;
167 } 181 }