We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beefa6b commit e548ca4Copy full SHA for e548ca4
include/linux/blkdev.h
@@ -903,7 +903,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq)
903
if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC))
904
return q->limits.max_hw_sectors;
905
906
- if (!q->limits.chunk_sectors)
+ if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD))
907
return blk_queue_get_max_sectors(q, rq->cmd_flags);
908
909
return min(blk_max_size_offset(q, blk_rq_pos(rq)),
0 commit comments