block: update chunk_sectors in blk_stack_limits()
authorHannes Reinecke <[email protected]>
Tue, 18 Oct 2016 06:40:31 +0000 (15:40 +0900)
committerJens Axboe <[email protected]>
Tue, 18 Oct 2016 16:02:04 +0000 (10:02 -0600)
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]>
block/blk-settings.c

index b1d5b7fa4d0766d4e43e92c81f82867fc3b5c661..55369a65dea2a82e58396f68e74bc58868b434c5 100644 (file)
@@ -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);