linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix wrong failed mirror_num of read-repair on raid56
@ 2017-03-24 19:13 Liu Bo
  2017-03-27 17:07 ` David Sterba
  2017-03-29 17:54 ` [PATCH v2] " Liu Bo
  0 siblings, 2 replies; 5+ messages in thread
From: Liu Bo @ 2017-03-24 19:13 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

In raid56 senario, after trying parity recovery, we didn't set
mirror_num for btrfs_bio with failed mirror_num, hence
end_bio_extent_readpage() will report a random mirror_num in dmesg
log.

Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/volumes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 73d56ee..be64e4a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6197,6 +6197,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
 		} else {
 			ret = raid56_parity_recover(fs_info, bio, bbio,
 						    map_length, mirror_num, 1);
+			btrfs_io_bio(bio)->mirror_num = mirror_num;
 		}
 
 		btrfs_bio_counter_dec(fs_info);
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-30 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 19:13 [PATCH] Btrfs: fix wrong failed mirror_num of read-repair on raid56 Liu Bo
2017-03-27 17:07 ` David Sterba
2017-03-29  4:54   ` Liu Bo
2017-03-29 17:54 ` [PATCH v2] " Liu Bo
2017-03-30 11:43   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).