Skip to contentSkip to conversation

block: Initialize max_dev_sectors to 0

PATCH In review Keith Busch 2 participants 3 messages Mar 2, 2016 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Initialize max_dev_sectors to 0

commit 5f009d3f8e6685fe8c6215082c1696a08b411220 upstream

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.

---
 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
maintainer
#1 lore raw
Quoted 5 lines · Keith Busch

commit 5f009d3f8e6685fe8c6215082c1696a08b411220 upstream

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.

Quoted 8 lines
---
 block/blk-settings.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

What stable version(s) do you want this to go to?

greg k-h

#2 lore raw
Quoted 15 lines · Greg KH
Quoted 5 lines · Keith Busch

commit 5f009d3f8e6685fe8c6215082c1696a08b411220 upstream

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.

Quoted 8 lines
---
 block/blk-settings.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 3 lines

What stable version(s) do you want this to go to?

greg k-h

Just to 4.4. The issue this fixes was introduced with that release.