Re: [PATCH v2 1/5] btrfs: scrub: Introduce full stripe lock for RAID56

2017-03-27 Thread Qu Wenruo
Thanks for the review first. At 03/28/2017 12:38 AM, David Sterba wrote: On Fri, Mar 24, 2017 at 10:00:23AM +0800, Qu Wenruo wrote: Unlike mirror based profiles, RAID5/6 recovery needs to read out the whole full stripe. And if we don't do proper protect, it can easily cause race condition. In

Re: [PATCH v2 1/5] btrfs: scrub: Introduce full stripe lock for RAID56

2017-03-27 Thread David Sterba
On Fri, Mar 24, 2017 at 10:00:23AM +0800, Qu Wenruo wrote: > Unlike mirror based profiles, RAID5/6 recovery needs to read out the > whole full stripe. > > And if we don't do proper protect, it can easily cause race condition. > > Introduce 2 new functions: lock_full_stripe() and unlock_full_strip

[PATCH v2 1/5] btrfs: scrub: Introduce full stripe lock for RAID56

2017-03-23 Thread Qu Wenruo
Unlike mirror based profiles, RAID5/6 recovery needs to read out the whole full stripe. And if we don't do proper protect, it can easily cause race condition. Introduce 2 new functions: lock_full_stripe() and unlock_full_stripe() for RAID5/6. Which stores a rb_tree of mutex for full stripes, so s