linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] RAID5/6 scrub race fix
@ 2016-11-15  2:50 Qu Wenruo
  2016-11-15  2:50 ` [PATCH 1/2] btrfs: scrub: Introduce full stripe lock for RAID56 Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Qu Wenruo @ 2016-11-15  2:50 UTC (permalink / raw)
  To: linux-btrfs; +Cc: kreijack

Fix the so-called famous RAID5/6 scrub error.

Thanks Goffredo Baroncelli for reporting the bug, and make it into our
sight.
(Yes, without the Phoronix report on this,
https://www.phoronix.com/scan.php?page=news_item&px=Btrfs-RAID-56-Is-Bad,
I won't ever be aware of it)

Unlike many of us(including myself) assumed, it's not a timed bomb buried
deeply into the RAID5/6 code, but a race condition in scrub recovery
code.

The problem is not found because normal mirror based profiles aren't
affected by the race, since they are independent with each other.

Although this time the fix doesn't affect the scrub code much, it should
warn us that current scrub code is really hard to maintain.

Abuse of workquque to delay works and the full fs scrub is race prone.

Xfstest will follow a little later, as we don't have good enough tools
to corrupt data stripes pinpointly.

Qu Wenruo (2):
  btrfs: scrub: Introduce full stripe lock for RAID56
  btrfs: scrub: Fix RAID56 recovery race condition

 fs/btrfs/ctree.h       |   4 ++
 fs/btrfs/extent-tree.c |   3 +
 fs/btrfs/scrub.c       | 192 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 199 insertions(+)

-- 
2.10.2




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

end of thread, other threads:[~2016-11-18 22:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15  2:50 [PATCH 0/2] RAID5/6 scrub race fix Qu Wenruo
2016-11-15  2:50 ` [PATCH 1/2] btrfs: scrub: Introduce full stripe lock for RAID56 Qu Wenruo
2016-11-15  2:50 ` [PATCH 2/2] btrfs: scrub: Fix RAID56 recovery race condition Qu Wenruo
2016-11-17 18:09 ` [PATCH 0/2] RAID5/6 scrub race fix Goffredo Baroncelli
2016-11-18  0:57   ` Qu Wenruo
2016-11-17 23:13 ` Zygo Blaxell
2016-11-18  1:19   ` Qu Wenruo
2016-11-18  1:56     ` Hugo Mills
2016-11-18  2:42       ` Qu Wenruo
2016-11-18  4:43         ` Zygo Blaxell
2016-11-18  6:27           ` Qu Wenruo
2016-11-18 18:09   ` Goffredo Baroncelli
2016-11-18 22:32     ` Zygo Blaxell

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).