Skip to content

Commit

Permalink
block: update chunk_sectors in blk_stack_limits()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Reinecke authored and Jens Axboe committed Oct 18, 2016
1 parent 87caf97 commit 987b3b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/blk-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 987b3b2

Please sign in to comment.