diff options
author | Jianchao Wang <jianchao.w.wang@oracle.com> | 2018-10-27 19:52:14 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-29 09:32:40 -0600 |
commit | 69840466086d2248898020a08dda52732686c4e6 (patch) | |
tree | 4fd830c19b4c91854952e9ca56ba29cbdd99e376 /drivers/block/mtip32xx | |
parent | a435ab4f80f983c53b4ca4f8c12b3ddd3ca17670 (diff) | |
download | talos-obmc-linux-69840466086d2248898020a08dda52732686c4e6.tar.gz talos-obmc-linux-69840466086d2248898020a08dda52732686c4e6.zip |
block: fix the DISCARD request merge
There are two cases when handle DISCARD merge.
If max_discard_segments == 1, the bios/requests need to be contiguous
to merge. If max_discard_segments > 1, it takes every bio as a range
and different range needn't to be contiguous.
But now, attempt_merge screws this up. It always consider contiguity
for DISCARD for the case max_discard_segments > 1 and cannot merge
contiguous DISCARD for the case max_discard_segments == 1, because
rq_attempt_discard_merge always returns false in this case.
This patch fixes both of the two cases above.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mtip32xx')
0 files changed, 0 insertions, 0 deletions