aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2012-03-23 12:32:28 -0400
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-03-27 08:51:21 -0400
commit7a3ae2f8c8c8432e65467b7fc84d5deab04061a0 (patch)
treee93c46eb8def633533fe80032872f71b36fc03b8 /fs/btrfs/ioctl.c
parent103e976616fe9c2a3e40764c979fa1a592274da2 (diff)
Btrfs: fix regression in scrub path resolving
In commit 4692cf58 we introduced new backref walking code for btrfs. This assumes we're searching live roots, which requires a transaction context. While scrubbing, however, we must not join a transaction because this could deadlock with the commit path. Additionally, what scrub really wants to do is resolving a logical address in the commit root it's currently checking. This patch adds support for logical to path resolving on commit roots and makes scrub use that. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
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 05446f77f99b..013c6371e3e8 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3067,8 +3067,8 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
3067 goto out; 3067 goto out;
3068 3068
3069 extent_item_pos = loi->logical - key.objectid; 3069 extent_item_pos = loi->logical - key.objectid;
3070 ret = iterate_extent_inodes(root->fs_info, path, key.objectid, 3070 ret = iterate_extent_inodes(root->fs_info, key.objectid,
3071 extent_item_pos, build_ino_list, 3071 extent_item_pos, 0, build_ino_list,
3072 inodes); 3072 inodes);
3073 3073
3074 if (ret < 0) 3074 if (ret < 0)