[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190111131100.218159212@linuxfoundation.org>
Date: Fri, 11 Jan 2019 15:15:14 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Mike Snitzer <snitzer@...hat.com>
Subject: [PATCH 4.20 28/65] dm: do not allow readahead to limit IO size
4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaegeuk Kim <jaegeuk@...nel.org>
commit c6d6e9b0f6b4201c77f2cea3964dd122697e3543 upstream.
Update DM to set the bdi's io_pages. This fixes reads to be capped at
the device's max request size (even if user's read IO exceeds the
established readahead setting).
Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting")
Cc: stable@...r.kernel.org
Reviewed-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
Signed-off-by: Mike Snitzer <snitzer@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/md/dm-table.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1927,6 +1927,9 @@ void dm_table_set_restrictions(struct dm
*/
if (blk_queue_is_zoned(q))
blk_revalidate_disk_zones(t->md->disk);
+
+ /* Allow reads to exceed readahead limits */
+ q->backing_dev_info->io_pages = limits->max_sectors >> (PAGE_SHIFT - 9);
}
unsigned int dm_table_get_num_targets(struct dm_table *t)
Powered by blists - more mailing lists