Skip to content

Commit 987b3b2

Browse files
hreineckeaxboe
authored andcommitted
block: update chunk_sectors in blk_stack_limits()
Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Shaun Tancheff <[email protected]> Tested-by: Shaun Tancheff <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 87caf97 commit 987b3b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

block/blk-settings.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
631631
t->discard_granularity;
632632
}
633633

634+
if (b->chunk_sectors)
635+
t->chunk_sectors = min_not_zero(t->chunk_sectors,
636+
b->chunk_sectors);
637+
634638
return ret;
635639
}
636640
EXPORT_SYMBOL(blk_stack_limits);

0 commit comments

Comments
 (0)