aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2012-09-07 22:01:30 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:19 -0400
commit425d17a290c0c63785ec65db154a95c6337aeefa (patch)
tree9bc771d91851db6f0655f23fdb3b7fd3e127cb52 /fs/btrfs/ioctl.c
parentdf031f0752d50f2061df2847d57ea52a79f7977c (diff)
Btrfs: use larger limit for translation of logical to inode
This is the change of the kernel side. Translation of logical to inode used to have an upper limit 4k on inode container's size, but the limit is not large enough for a data with a great many of refs, so when resolving logical address, we can end up with "ioctl ret=0, bytes_left=0, bytes_missing=19944, cnt=510, missed=2493" This changes to regard 64k as the upper limit and use vmalloc instead of kmalloc to get memory more easily. Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fa1284d596ea..38e3d6ab89d3 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3230,7 +3230,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3230 goto out; 3230 goto out;
3231 } 3231 }
3232 3232
3233 size = min_t(u32, loi->size, 4096); 3233 size = min_t(u32, loi->size, 64 * 1024);
3234 inodes = init_data_container(size); 3234 inodes = init_data_container(size);
3235 if (IS_ERR(inodes)) { 3235 if (IS_ERR(inodes)) {
3236 ret = PTR_ERR(inodes); 3236 ret = PTR_ERR(inodes);
@@ -3252,7 +3252,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3252 3252
3253out: 3253out:
3254 btrfs_free_path(path); 3254 btrfs_free_path(path);
3255 kfree(inodes); 3255 vfree(inodes);
3256 kfree(loi); 3256 kfree(loi);
3257 3257
3258 return ret; 3258 return ret;