https://github.com/torvalds/linux
Revision ca64cae96037de16e4af92678814f5d4bf0c1c65 authored by NeilBrown on 21 November 2012, 05:33:40 UTC, committed by NeilBrown on 21 November 2012, 22:14:13 UTC
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>
1 parent ef5b7c6
History
Tip revision: ca64cae96037de16e4af92678814f5d4bf0c1c65 authored by NeilBrown on 21 November 2012, 05:33:40 UTC
md/raid5: Make sure we clear R5_Discard when discard is finished.
Tip revision: ca64cae
File Mode Size
partitions
Kconfig -rw-r--r-- 3.3 KB
Kconfig.iosched -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 720 bytes
blk-cgroup.c -rw-r--r-- 24.0 KB
blk-cgroup.h -rw-r--r-- 13.6 KB
blk-core.c -rw-r--r-- 80.9 KB
blk-exec.c -rw-r--r-- 3.1 KB
blk-flush.c -rw-r--r-- 13.1 KB
blk-integrity.c -rw-r--r-- 11.5 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iopoll.c -rw-r--r-- 5.9 KB
blk-lib.c -rw-r--r-- 6.9 KB
blk-map.c -rw-r--r-- 8.2 KB
blk-merge.c -rw-r--r-- 12.7 KB
blk-settings.c -rw-r--r-- 26.3 KB
blk-softirq.c -rw-r--r-- 4.5 KB
blk-sysfs.c -rw-r--r-- 15.5 KB
blk-tag.c -rw-r--r-- 9.7 KB
blk-throttle.c -rw-r--r-- 30.8 KB
blk-timeout.c -rw-r--r-- 4.7 KB
blk.h -rw-r--r-- 7.1 KB
bsg-lib.c -rw-r--r-- 6.2 KB
bsg.c -rw-r--r-- 23.7 KB
cfq-iosched.c -rw-r--r-- 108.1 KB
compat_ioctl.c -rw-r--r-- 20.8 KB
deadline-iosched.c -rw-r--r-- 11.1 KB
elevator.c -rw-r--r-- 23.0 KB
genhd.c -rw-r--r-- 43.4 KB
ioctl.c -rw-r--r-- 10.7 KB
noop-iosched.c -rw-r--r-- 2.5 KB
partition-generic.c -rw-r--r-- 14.0 KB
scsi_ioctl.c -rw-r--r-- 19.6 KB

back to top