[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181218172537.12300-1-jaegeuk@kernel.org>
Date: Tue, 18 Dec 2018 09:25:37 -0800
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@...nel.org>, stable@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>, Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com
Subject: [PATCH] dm: give req_size precisely given by user
This patch makes dm be aware of io_pages to assign sane req_size for reads.
Cc: stable@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Alasdair Kergon <agk@...hat.com>
Cc: Mike Snitzer <snitzer@...hat.com>
Cc: dm-devel@...hat.com
Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting")
Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.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)
--
2.19.0.605.g01d371f741-goog
Powered by blists - more mailing lists