Skip to contentSkip to conversation

dm: give req_size precisely given by user

PATCH In review Jaegeuk Kim 4 participants 5 messages Dec 18, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 Jens Axboe <[email protected]>
Cc Alasdair Kergon <[email protected]>
Cc Mike Snitzer <[email protected]>
Fixes 9491ae4a ("mm: don't cap request size based on read-ahead setting")
---
 drivers/md/dm-table.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/md/dm-table.c +3 -0
index 9038c302d5c2..886790428241 100644
@@ -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)
Signature · 1 line
2.19.0.605.g01d371f741-goog
maintainer
#4 lore raw
In reply to Jaegeuk Kim

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag, fixing commit: 9491ae4aade6 mm: don't cap request size based on read-ahead setting.

The bot has tested the following trees: v4.19.10, v4.14.89,

v4.19.10: Failed to apply! Possible dependencies:

    5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    a91e138022bc ("block: Introduce blkdev_nr_zones() helper")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    d2e428e49eec ("scsi: sd_zbc: Reduce boot device scan and revalidate time")
    e76239a3748c ("block: add a report_zones method")

v4.14.89: Failed to apply! Possible dependencies:
08e18eab0c57 ("block: add bi_blkg to the bio for cgroups")
30e5e929c7bf ("nvme: don't pass struct nvme_ns to nvme_config_discard") 5238dcf4136f ("block: replace bio->bi_issue_stat with bio-specific type") 53cfdc10a95d ("blk-throttle: fix null pointer dereference while throttling writeback IOs") 5d47c89f29ea ("dm: clear all discard attributes in queue_limits when discards are disabled") 8b904b5b6b58 ("block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()") a2d6b3a2d390 ("block: Improve zone reset execution")
b889bf66d001 ("blk-throttle: track read and write request individually") bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
c8b5fd031a30 ("mmc: block: Factor out mmc_setup_queue()")
d70675121546 ("block: introduce blk-iolatency io controller")
e447a0151f7c ("zram: set BDI_CAP_STABLE_WRITES once")
ed754e5deeb1 ("nvme: track shared namespaces")

How should we proceed with this patch?

--
Thanks,
Sasha