lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <158290150891.4423.13566449569964563258.stgit@buzz>
Date:   Fri, 28 Feb 2020 17:51:48 +0300
From:   Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To:     linux-block@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        linux-kernel@...r.kernel.org
Cc:     linux-raid@...r.kernel.org, Song Liu <song@...nel.org>,
        Dmitry Monakhov <dmtrmonakhov@...dex-team.ru>
Subject: [PATCH] block: keep bdi->io_pages in sync with max_sectors_kb for
 stacked devices

Field bdi->io_pages added in commit 9491ae4aade6 ("mm: don't cap request
size based on read-ahead setting") removes unneeded split of read requests.

Stacked drivers do not call blk_queue_max_hw_sectors(). Instead they setup
limits of their devices by blk_set_stacking_limits() + disk_stack_limits().
Field bio->io_pages stays zero until user set max_sectors_kb via sysfs.

This patch updates io_pages after merging limits in disk_stack_limits().

Commit c6d6e9b0f6b4 ("dm: do not allow readahead to limit IO size") fixed
the same problem for device-mapper devices, this one fixes MD RAIDs.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
---
 block/blk-settings.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/blk-settings.c b/block/blk-settings.c
index c8eda2e7b91e..66c45fd79545 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -664,6 +664,8 @@ void disk_stack_limits(struct gendisk *disk, struct block_device *bdev,
 		printk(KERN_NOTICE "%s: Warning: Device %s is misaligned\n",
 		       top, bottom);
 	}
+
+	t->backing_dev_info->io_pages = t->limits.max_sectors >> (PAGE_SHIFT-9);
 }
 EXPORT_SYMBOL(disk_stack_limits);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ