diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-06-03 09:36:29 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-04 08:03:47 -0400 |
commit | 4b9465cb9e3859186eefa1ca3b990a5849386320 (patch) | |
tree | 8fc06452fb75e52f6c1c2e2253c2ff6700e622fd /fs/btrfs/free-space-cache.c | |
parent | e7786c3ae517b2c433edc91714e86be770e9f1ce (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/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 1cb72394498c..bffa5c4a633b 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -2536,6 +2536,9 @@ int load_free_ino_cache(struct btrfs_fs_info *fs_info, struct btrfs_root *root) | |||
2536 | int ret = 0; | 2536 | int ret = 0; |
2537 | u64 root_gen = btrfs_root_generation(&root->root_item); | 2537 | u64 root_gen = btrfs_root_generation(&root->root_item); |
2538 | 2538 | ||
2539 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | ||
2540 | return 0; | ||
2541 | |||
2539 | /* | 2542 | /* |
2540 | * If we're unmounting then just return, since this does a search on the | 2543 | * If we're unmounting then just return, since this does a search on the |
2541 | * normal root and not the commit root and we could deadlock. | 2544 | * normal root and not the commit root and we could deadlock. |
@@ -2575,6 +2578,9 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root, | |||
2575 | struct inode *inode; | 2578 | struct inode *inode; |
2576 | int ret; | 2579 | int ret; |
2577 | 2580 | ||
2581 | if (!btrfs_test_opt(root, INODE_MAP_CACHE)) | ||
2582 | return 0; | ||
2583 | |||
2578 | inode = lookup_free_ino_inode(root, path); | 2584 | inode = lookup_free_ino_inode(root, path); |
2579 | if (IS_ERR(inode)) | 2585 | if (IS_ERR(inode)) |
2580 | return 0; | 2586 | return 0; |