diff options
author | NeilBrown <neilb@suse.de> | 2014-05-28 13:39:22 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-05-29 16:59:46 +1000 |
commit | 67f455486d2ea20b2d94d6adf5b9b783d079e321 (patch) | |
tree | 320f360d77b56f03c754b29fa617d61d25d40ec4 /drivers/md/dm-cache-metadata.h | |
parent | bd8839e03b8e70fbbe08bbff70d8cba95273c823 (diff) |
md/raid56: Don't perform reads to support writes until stripe is ready.
If it is found that we need to pre-read some blocks before a write
can succeed, we normally set STRIPE_DELAYED and don't actually perform
the read until STRIPE_PREREAD_ACTIVE subsequently gets set.
However for a degraded RAID6 we currently perform the reads as soon
as we see that a write is pending. This significantly hurts
throughput.
So:
- when handle_stripe_dirtying find a block that it wants on a device
that is failed, set STRIPE_DELAY, instead of doing nothing, and
- when fetch_block detects that a read might be required to satisfy a
write, only perform the read if STRIPE_PREREAD_ACTIVE is set,
and if we would actually need to read something to complete the write.
This also helps RAID5, though less often as RAID5 supports a
read-modify-write cycle. For RAID5 the read is performed too early
only if the write is not a full 4K aligned write (i.e. no an
R5_OVERWRITE).
Also clean up a couple of horrible bits of formatting.
Reported-by: Patrik HornĂk <patrik@dsl.sk>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/dm-cache-metadata.h')
0 files changed, 0 insertions, 0 deletions