diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2011-06-16 12:05:19 +0200 |
---|---|---|
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2011-09-29 13:38:42 +0200 |
commit | 2774b2ca3d49124bf1ae89e8d575b3dab4221266 (patch) | |
tree | 8bbf543499cb9af6593307d04ec346a275afd443 /fs | |
parent | 1503140d3ec2be9b917d2f8f7c64cb77b79a215b (diff) | |
download | talos-op-linux-2774b2ca3d49124bf1ae89e8d575b3dab4221266.tar.gz talos-op-linux-2774b2ca3d49124bf1ae89e8d575b3dab4221266.zip |
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')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
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) } bio->bi_private = bbio->private; bio->bi_end_io = bbio->end_io; + bio->bi_bdev = (struct block_device *) + (unsigned long)bbio->mirror_num; /* only send an error to the higher layers if it is * beyond the tolerance of the multi-bio */ |