diff options
| author | Tang Junhui <tang.junhui@zte.com.cn> | 2017-09-06 14:25:52 +0800 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2017-11-26 13:50:33 +0000 |
| commit | d1550aa7f5c100e6269afbf58acbcd3abfb5dcc6 (patch) | |
| tree | 48999cb1a8bb5b188da7c3b7c9468003ec10a5f0 /kernel | |
| parent | 66d2774a1664c759083d2a214bea9bd56a7ab47e (diff) | |
bcache: fix sequential large write IO bypass
commit c81ffa32a214c84b08900fbc9d432187bd948eba upstream.
Sequential write IOs were tested with bs=1M by FIO in writeback cache
mode, these IOs were expected to be bypassed, but actually they did not.
We debug the code, and find in check_should_bypass():
if (!congested &&
mode == CACHE_MODE_WRITEBACK &&
op_is_write(bio_op(bio)) &&
(bio->bi_opf & REQ_SYNC))
goto rescale
that means, If in writeback mode, a write IO with REQ_SYNC flag will not
be bypassed though it is a sequential large IO, It's not a correct thing
to do actually, so this patch remove these codes.
Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
Reviewed-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Eric Wheeler <bcache@linux.ewheeler.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[bwh: Backported to 3.16: deleted code is slightly different]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
