Two fixes for md
1/ Another live lock, needs backporting 2/ work-around false positive with new warnings. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUAVNE+TDnsnt1WYoG5AQIX8w/9EWD9hTM3HEatrdZFfOgQrG4fafpZoOHT +fxMTyvIbIr7ppL3lZVA6KmyDS15/BIt0JhwMy7pzaPqvxSCK/qqGOdE8h1nVaN1 /TbARZCCOn62PsRxKQDHCsU8lsRt3VNH4fGvm0RBTry/RtvGrxcqIBLGnwWseCQq SGVj1uKb+PI5FL8c4GvyVCdBD+uO8idpY6D6Rd2WQbuskOPoJhIEZRh0wPHEYvWw rJ+gzzWkalFOjPgejS54ZrTGxOgvZ0NiAaFuEQaDG2zRc27luDxF/eyCR9G12juC YH8M2IxNp0i20iaoNp8A+D8ksMbNE3OEFOZx2gtFwItQ3aye455Lv+C0ZnbxlWD/ R+399E0wKtFp8onW+KALoJvgZHjlanj3uIjSPltlCxDDQ3F5Any6h6uGIEOAVYx2 uruUmjp0JsxHio52R1Ai26VT+Ssc49GVEfBwcFej/ZGs8a0XxvYWuk1lllh9AL0w 8THt9yVQMR8NmUYrNnceRK6BJN4PdFHi/jxoLzeQfW2OHpmuug2Q0M/raYZGOIx6 xI92XPIGKN/kzRhBua75KhQkX5HBGJFP0kutIHj58AHacMFbiiJl9lzSIjGOJzjS sBxyvvnOYUV4QW2Kb3KNfJWu2dDbLx/z4xzzkiG22d+LSW03FaPPnqSXXT59FIhQ OzNfUxdNLJc= =qYoP -----END PGP SIGNATURE----- Merge tag 'md/3.19-fixes' of git://neil.brown.name/md Pull two fixes for md from Neil Brown: - Another live lock, needs backporting - work-around false positive with new warnings. * tag 'md/3.19-fixes' of git://neil.brown.name/md: md/bitmap: fix a might_sleep() warning. md/raid5: fix another livelock caused by non-aligned writes.
This commit is contained in:
commit
59acf65776
|
@ -72,6 +72,19 @@ __acquires(bitmap->lock)
|
|||
/* this page has not been allocated yet */
|
||||
|
||||
spin_unlock_irq(&bitmap->lock);
|
||||
/* It is possible that this is being called inside a
|
||||
* prepare_to_wait/finish_wait loop from raid5c:make_request().
|
||||
* In general it is not permitted to sleep in that context as it
|
||||
* can cause the loop to spin freely.
|
||||
* That doesn't apply here as we can only reach this point
|
||||
* once with any loop.
|
||||
* When this function completes, either bp[page].map or
|
||||
* bp[page].hijacked. In either case, this function will
|
||||
* abort before getting to this point again. So there is
|
||||
* no risk of a free-spin, and so it is safe to assert
|
||||
* that sleeping here is allowed.
|
||||
*/
|
||||
sched_annotate_sleep();
|
||||
mappage = kzalloc(PAGE_SIZE, GFP_NOIO);
|
||||
spin_lock_irq(&bitmap->lock);
|
||||
|
||||
|
|
|
@ -3195,6 +3195,11 @@ static void handle_stripe_dirtying(struct r5conf *conf,
|
|||
(unsigned long long)sh->sector,
|
||||
rcw, qread, test_bit(STRIPE_DELAYED, &sh->state));
|
||||
}
|
||||
|
||||
if (rcw > disks && rmw > disks &&
|
||||
!test_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
|
||||
set_bit(STRIPE_DELAYED, &sh->state);
|
||||
|
||||
/* now if nothing is locked, and if we have enough data,
|
||||
* we can start a write request
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue