]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE.
authormajianpeng <majianpeng@gmail.com>
Thu, 19 Jul 2012 10:49:59 +0000 (20:49 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 19 Jul 2012 10:49:59 +0000 (20:49 +1000)
commit4fdbfc0c58f9ae959e320b25ae3e1e9850a4b514
treed72594c35ce9da8151b91605d4c8778f19293356
parente0c1b684d9487eb57e95ec9d960d46bf98716207
md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE.

'sync' writes set both REQ_SYNC and REQ_NOIDLE.
O_DIRECT writes set REQ_SYNC but not REQ_NOIDLE.

We currently assume that a REQ_SYNC request will not be followed by
more requests and so set STRIPE_PREREAD_ACTIVE to expedite the
request.
This is appropriate for sync requests, but not for O_DIRECT requests.

So make the setting of STRIPE_PREREAD_ACTIVE conditional on REQ_NOIDLE
rather than REQ_SYNC.  This is consistent with the documented meaning
of REQ_NOIDLE:

        __REQ_NOIDLE,           /* don't anticipate more IO after this one */

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c