aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-06-03 09:36:29 -0400
committerChris Mason <chris.mason@oracle.com>2011-06-04 08:03:47 -0400
commit4b9465cb9e3859186eefa1ca3b990a5849386320 (patch)
tree8fc06452fb75e52f6c1c2e2253c2ff6700e622fd /fs/btrfs/super.c
parente7786c3ae517b2c433edc91714e86be770e9f1ce (diff)
Btrfs: add mount -o inode_cache
This makes the inode map cache default to off until we fix the overflow problem when the free space crcs don't fit inside a single page. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 28e3cb2607ff..3559d0b3518a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -160,7 +160,8 @@ enum {
160 Opt_compress_type, Opt_compress_force, Opt_compress_force_type, 160 Opt_compress_type, Opt_compress_force, Opt_compress_force_type,
161 Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, 161 Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard,
162 Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, 162 Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed,
163 Opt_enospc_debug, Opt_subvolrootid, Opt_defrag, Opt_err, 163 Opt_enospc_debug, Opt_subvolrootid, Opt_defrag,
164 Opt_inode_cache, Opt_err,
164}; 165};
165 166
166static match_table_t tokens = { 167static match_table_t tokens = {
@@ -192,6 +193,7 @@ static match_table_t tokens = {
192 {Opt_enospc_debug, "enospc_debug"}, 193 {Opt_enospc_debug, "enospc_debug"},
193 {Opt_subvolrootid, "subvolrootid=%d"}, 194 {Opt_subvolrootid, "subvolrootid=%d"},
194 {Opt_defrag, "autodefrag"}, 195 {Opt_defrag, "autodefrag"},
196 {Opt_inode_cache, "inode_cache"},
195 {Opt_err, NULL}, 197 {Opt_err, NULL},
196}; 198};
197 199
@@ -360,6 +362,10 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
360 printk(KERN_INFO "btrfs: enabling disk space caching\n"); 362 printk(KERN_INFO "btrfs: enabling disk space caching\n");
361 btrfs_set_opt(info->mount_opt, SPACE_CACHE); 363 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
362 break; 364 break;
365 case Opt_inode_cache:
366 printk(KERN_INFO "btrfs: enabling inode map caching\n");
367 btrfs_set_opt(info->mount_opt, INODE_MAP_CACHE);
368 break;
363 case Opt_clear_cache: 369 case Opt_clear_cache:
364 printk(KERN_INFO "btrfs: force clearing of disk cache\n"); 370 printk(KERN_INFO "btrfs: force clearing of disk cache\n");
365 btrfs_set_opt(info->mount_opt, CLEAR_CACHE); 371 btrfs_set_opt(info->mount_opt, CLEAR_CACHE);