summaryrefslogtreecommitdiffstats
path: root/block/blk-settings.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-10-18 15:40:31 +0900
committerJens Axboe <axboe@fb.com>2016-10-18 10:02:04 -0600
commit987b3b26eb7b19960160505faf9b2f50ae77e14d (patch)
treec16e422987df0ef28620b523bddd220f672529f8 /block/blk-settings.c
parent87caf97cf54b5082e56af241b88a2b8a30d17ef3 (diff)
downloadop-kernel-dev-987b3b26eb7b19960160505faf9b2f50ae77e14d.zip
op-kernel-dev-987b3b26eb7b19960160505faf9b2f50ae77e14d.tar.gz
block: update chunk_sectors in blk_stack_limits()
Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@seagate.com> Tested-by: Shaun Tancheff <shaun.tancheff@seagate.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r--block/blk-settings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index b1d5b7f..55369a6 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -631,6 +631,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
t->discard_granularity;
}
+ if (b->chunk_sectors)
+ t->chunk_sectors = min_not_zero(t->chunk_sectors,
+ b->chunk_sectors);
+
return ret;
}
EXPORT_SYMBOL(blk_stack_limits);
OpenPOWER on IntegriCloud