diff options
author | Keith Busch <keith.busch@intel.com> | 2015-08-19 17:24:05 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-19 17:26:02 -0400 |
commit | 03100aada96f0645bbcb89aea24c01f02d0ef1fa (patch) | |
tree | ba909d035a188206b101ae633f925e18d749f7cc /drivers/block | |
parent | d2be537c3ba3568acd79cd178327b842e60d035e (diff) |
block: Replace SG_GAPS with new queue limits mask
The SG_GAPS queue flag caused checks for bio vector alignment against
PAGE_SIZE, but the device may have different constraints. This patch
adds a queue limits so a driver with such constraints can set to allow
requests that would have been unnecessarily split. The new gaps check
takes the request_queue as a parameter to simplify the logic around
invoking this function.
This new limit makes the queue flag redundant, so removing it and
all usage. Device-mappers will inherit the correct settings through
blk_stack_limits().
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index d844ec4a2b85..2f694d78da55 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
@@ -2067,7 +2067,6 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid) | |||
2067 | goto out_free_ns; | 2067 | goto out_free_ns; |
2068 | queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, ns->queue); | 2068 | queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, ns->queue); |
2069 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, ns->queue); | 2069 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, ns->queue); |
2070 | queue_flag_set_unlocked(QUEUE_FLAG_SG_GAPS, ns->queue); | ||
2071 | ns->dev = dev; | 2070 | ns->dev = dev; |
2072 | ns->queue->queuedata = ns; | 2071 | ns->queue->queuedata = ns; |
2073 | 2072 | ||
@@ -2087,6 +2086,7 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid) | |||
2087 | blk_queue_chunk_sectors(ns->queue, dev->stripe_size >> 9); | 2086 | blk_queue_chunk_sectors(ns->queue, dev->stripe_size >> 9); |
2088 | if (dev->vwc & NVME_CTRL_VWC_PRESENT) | 2087 | if (dev->vwc & NVME_CTRL_VWC_PRESENT) |
2089 | blk_queue_flush(ns->queue, REQ_FLUSH | REQ_FUA); | 2088 | blk_queue_flush(ns->queue, REQ_FLUSH | REQ_FUA); |
2089 | blk_queue_virt_boundary(ns->queue, dev->page_size - 1); | ||
2090 | 2090 | ||
2091 | disk->major = nvme_major; | 2091 | disk->major = nvme_major; |
2092 | disk->first_minor = 0; | 2092 | disk->first_minor = 0; |