Skip to contentSkip to conversation

block: Initialize max_dev_sectors to 0

PATCH New Keith Busch 4 participants 6 messages Feb 10, 2016 – Mar 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

The new queue limit is not used by the majority of block drivers, and should be initialized to 0 for the driver's requested settings to be used.

Signed-off-by Keith Busch <keith.busch at intel.com>
Cc Christoph Hellwig <hch at infradead.org>
Acked-by Martin K. Petersen <martin.petersen at oracle.com>
---
 block/blk-settings.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/blk-settings.c +2 -2
index dd49735..c7bb666 100644
@@ -91,8 +91,8 @@ void blk_set_default_limits(struct queue_limits *lim)
 	lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
 	lim->virt_boundary_mask = 0;
 	lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
-	lim->max_sectors = lim->max_dev_sectors = lim->max_hw_sectors =
-		BLK_SAFE_MAX_SECTORS;
+	lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
+	lim->max_dev_sectors = 0;
 	lim->chunk_sectors = 0;
 	lim->max_write_same_sectors = 0;
 	lim->max_discard_sectors = 0;
Signature · 1 line
2.6.2.307.g37023ba
#1 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

Looks good,

Reviewed-by Sagi Grimberg <sagig at mellanox.com>
#2 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

In reply to Keith Busch
Quoted 6 lines · Keith Busch

The new queue limit is not used by the majority of block drivers, and should be initialized to 0 for the driver's requested settings to be used.

Signed-off-by Keith Busch <keith.busch at intel.com>
Cc Christoph Hellwig <hch at infradead.org>
Acked-by Martin K. Petersen <martin.petersen at oracle.com>

Looks good,

Reviewed-by Christoph Hellwig <hch at lst.de>
#3 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

In reply to Keith Busch
Quoted 2 lines · Keith Busch

The new queue limit is not used by the majority of block drivers, and should be initialized to 0 for the driver's requested settings to be used.

That's much better, thanks.

Signature · 1 line
Jens Axboe
#4 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

Quoted 5 lines · Jens Axboe
Quoted 2 lines · Keith Busch

The new queue limit is not used by the majority of block drivers, and should be initialized to 0 for the driver's requested settings to be used.

That's much better, thanks.

Btw, I think we also needs this for 4.4-stable, especially as it's going to be a long term release.

#5 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

Quoted 2 lines · Christoph Hellwig

Btw, I think we also needs this for 4.4-stable, especially as it's going to be a long term release.

Agreed, I even received bug reports this week for this issue from folks using 4.4-stable at the NVMe plugfest. I posted this patch to the stable list.