diff options
author | Jens Axboe <axboe@fb.com> | 2015-05-29 13:11:32 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-05-29 13:11:32 -0600 |
commit | e548ca4ee4595f65b262661d166310ad8a149bec (patch) | |
tree | f95e59f4a7694ba9e0a6a866da4e978c0c958c71 /include | |
parent | beefa6ba7bf304d3de3a02cb7366fb0a7d6b27ab (diff) | |
download | linux-stable-e548ca4ee4595f65b262661d166310ad8a149bec.tar.gz linux-stable-e548ca4ee4595f65b262661d166310ad8a149bec.tar.bz2 linux-stable-e548ca4ee4595f65b262661d166310ad8a149bec.zip |
block: don't honor chunk sizes for data-less IO
We don't need to honor chunk sizes for IO that doesn't carry any
data.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9ded80da2c16..ccaa9aecd593 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -903,7 +903,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) return q->limits.max_hw_sectors; - if (!q->limits.chunk_sectors) + if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) return blk_queue_get_max_sectors(q, rq->cmd_flags); return min(blk_max_size_offset(q, blk_rq_pos(rq)), |