aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2011-06-16 06:05:19 -0400
committerJan Schmidt <list.btrfs@jan-o-sch.net>2011-09-29 07:38:42 -0400
commit2774b2ca3d49124bf1ae89e8d575b3dab4221266 (patch)
tree8bbf543499cb9af6593307d04ec346a275afd443 /fs/btrfs
parent1503140d3ec2be9b917d2f8f7c64cb77b79a215b (diff)
btrfs: Put mirror_num in bi_bdev
The error correction code wants to make sure that only the bad mirror is rewritten. Thus, we need to know which mirror is the bad one. I did not find a more apropriate field than bi_bdev. But I think using this is fine, because it is modified by the block layer, anyway, and should not be read after the bio returned. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 9db4d7962f9b..18baac5a3f6c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3216,6 +3216,8 @@ static void btrfs_end_bio(struct bio *bio, int err)
3216 } 3216 }
3217 bio->bi_private = bbio->private; 3217 bio->bi_private = bbio->private;
3218 bio->bi_end_io = bbio->end_io; 3218 bio->bi_end_io = bbio->end_io;
3219 bio->bi_bdev = (struct block_device *)
3220 (unsigned long)bbio->mirror_num;
3219 /* only send an error to the higher layers if it is 3221 /* only send an error to the higher layers if it is
3220 * beyond the tolerance of the multi-bio 3222 * beyond the tolerance of the multi-bio
3221 */ 3223 */