diff options
author | Christoph Hellwig <hch@lst.de> | 2016-03-03 14:43:45 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-03 14:43:45 -0700 |
commit | f21018427cb007a0894c36ad702990ab639cbbb4 (patch) | |
tree | 88eff3b50155c51a210c61b0805f5a9c0daa9a14 | |
parent | 45686b6198bd824f083ff5293f191d78db9d708a (diff) | |
download | op-kernel-dev-f21018427cb007a0894c36ad702990ab639cbbb4.zip op-kernel-dev-f21018427cb007a0894c36ad702990ab639cbbb4.tar.gz |
block: fix blk_rq_get_max_sectors for driver private requests
Driver private request types should not get the artifical cap for the
FS requests. This is important to use the full device capabilities
for internal command or NVMe pass through commands.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Jeff Lien <Jeff.Lien@hgst.com>
Tested-by: Jeff Lien <Jeff.Lien@hgst.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Updated by me to use an explicit check for the one command type that
does support extended checking, instead of relying on the ordering
of the enum command values - as suggested by Keith.
Signed-off-by: Jens Axboe <axboe@fb.com>
-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 d7f6bca..413c84f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -895,7 +895,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) { struct request_queue *q = rq->q; - if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) + if (unlikely(rq->cmd_type != REQ_TYPE_FS)) return q->limits.max_hw_sectors; if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) |