This patch makes dm be aware of io_pages to assign sane req_size for reads.
Cc: stable@vger.kernel.org Cc: Jens Axboe axboe@kernel.dk Cc: Alasdair Kergon agk@redhat.com Cc: Mike Snitzer snitzer@redhat.com Cc: dm-devel@redhat.com Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting") Signed-off-by: Jaegeuk Kim jaegeuk@kernel.org --- drivers/md/dm-table.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9038c302d5c2..886790428241 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1927,6 +1927,9 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q, */ if (blk_queue_is_zoned(q)) blk_revalidate_disk_zones(t->md->disk); + + /* io_pages is used for readahead */ + q->backing_dev_info->io_pages = limits->max_sectors >> (PAGE_SHIFT - 9); }
unsigned int dm_table_get_num_targets(struct dm_table *t)
On 12/18/18 10:25 AM, Jaegeuk Kim wrote:
This patch makes dm be aware of io_pages to assign sane req_size for reads.
Reviewed-by: Jens Axboe axboe@kernel.dk
On Tue, Dec 18 2018 at 12:45pm -0500, Jens Axboe axboe@kernel.dk wrote:
On 12/18/18 10:25 AM, Jaegeuk Kim wrote:
This patch makes dm be aware of io_pages to assign sane req_size for reads.
Reviewed-by: Jens Axboe axboe@kernel.dk
I've applied this, see: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/c...
On 12/18, Mike Snitzer wrote:
On Tue, Dec 18 2018 at 12:45pm -0500, Jens Axboe axboe@kernel.dk wrote:
On 12/18/18 10:25 AM, Jaegeuk Kim wrote:
This patch makes dm be aware of io_pages to assign sane req_size for reads.
Reviewed-by: Jens Axboe axboe@kernel.dk
I've applied this, see: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/c...
Got it. Thank you so much.
linux-stable-mirror@lists.linaro.org