NeilBrown ca64cae960 md/raid5: Make sure we clear R5_Discard when discard is finished.
commit 9e44476851e91c86c98eb92b9bc27fb801f89072
    MD: raid5 avoid unnecessary zero page for trim

change raid5 to clear R5_Discard when the complete request is
handled rather than when submitting the per-device discard request.
However it did not clear R5_Discard for the parity device.

This means that if the stripe_head was reused before it expired from
the cache, the setting would be wrong and a hang would result.

Also if the R5_Uptodate bit happens to be set, R5_Discard again
won't be cleared.  But R5_Uptodate really should be clear at this point.

So make sure R5_Discard is cleared in all cases, and clear
R5_Uptodate when a 'discard' completes.

Signed-off-by: NeilBrown <neilb@suse.de>
2012-11-22 09:14:13 +11:00
..
2012-03-28 18:41:29 +01:00
2012-09-09 10:35:38 +02:00
2012-07-30 17:25:16 -07:00
2010-08-12 04:14:12 +01:00
2012-10-12 21:02:15 +01:00
2012-10-22 10:44:55 +11:00
2012-10-11 13:08:44 +11:00
2012-10-11 13:25:44 +11:00
2012-10-11 13:49:05 +11:00