Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-01 Thread Benjamin Marzinski
On Wed, Jul 01, 2020 at 10:54:34PM +0200, Martin Wilck wrote: > On Thu, 2020-06-18 at 18:06 -0500, Benjamin Marzinski wrote: > > > > I uploaded the test program, aio_test: > > > > https://github.com/bmarzins/test_programs.git > > > > You just need to run in on a queueing multipath device with

Re: [dm-devel] [PATCH 4/4] writeback: remove bdi->congested_fn

2020-07-01 Thread Coly Li
On 2020/7/1 17:06, Christoph Hellwig wrote: > Except for pktdvd, the only places setting congested bits are file > systems that allocate their own backing_dev_info structures. And > pktdvd is a deprecated driver that isn't useful in stack setup > either. So remove the dead congested_fn stacking

[dm-devel] [PATCH 1/4] libmultipath: fix sysfs dev_loss_tmo parsing

2020-07-01 Thread Benjamin Marzinski
dev_loss_tmo is a u32 value. However the kernel sysfs code prints it as a signed integer. This means that if dev_loss_tmo is above INT_MAX, the sysfs value will be a negative number. Parsing this was causing sysfs_set_rport_tmo() to fail. Signed-off-by: Benjamin Marzinski ---

[dm-devel] [PATCH 4/4] libmultipath: fix checker detection for nvme devices

2020-07-01 Thread Benjamin Marzinski
In order to fix hwhandler autodetection, commit 8794a776 made detect_alua() differentiate between failures to detect whether alua was supported, and successfully detecting that it was not supported. However, this causes nvme devices to get the TUR checker assigned to them. This is because there is

[dm-devel] [PATCH 3/4] kpartx: handle alternate bsd disklabel location

2020-07-01 Thread Benjamin Marzinski
bsd disk labels can either be at the start of the second sector, or 64 bytes into the first sector, but kpartx only handled the first case. However the second case is what parted creates, and what the linux kernel partition code expects. kpartx should handle both cases. Signed-off-by: Benjamin

[dm-devel] [PATCH 2/4] kpartx: read devices with direct IO

2020-07-01 Thread Benjamin Marzinski
If kpartx is used on top of shared storage, and a device has its partition table changed on one machine, and then kpartx is run on another, it may not see the new data, because the cache still contains the old data, and there is nothing to tell the machine running kpartx to invalidate it. To solve

[dm-devel] [PATCH 0/4] misc patches

2020-07-01 Thread Benjamin Marzinski
This is a small collection of individual bug fix patches that apply on top of my previous patch set. Benjamin Marzinski (4): libmultipath: fix sysfs dev_loss_tmo parsing kpartx: read devices with direct IO kpartx: handle alternate bsd disklabel location libmultipath: fix checker detection

Re: [dm-devel] [wi...@infradead.org: Re: [PATCH 6/6] mm: Add memalloc_nowait]

2020-07-01 Thread Jonathan Corbet
On Wed, 1 Jul 2020 05:13:16 +0100 Matthew Wilcox wrote: > > > -It turned out though that above approach has led to > > > -abuses when the restricted gfp mask is used "just in case" without a > > > -deeper consideration which leads to problems because an excessive use > > > -of GFP_NOFS/GFP_NOIO

Re: [dm-devel] [PATCH 07/11] block: get rid of blk_trace_request_get_cgid()

2020-07-01 Thread Chaitanya Kulkarni
On 6/30/20 11:16 PM, Christoph Hellwig wrote: > On Wed, Jul 01, 2020 at 04:38:06AM +, Chaitanya Kulkarni wrote: >> On 6/29/20 10:12 PM, Christoph Hellwig wrote: >>> On Mon, Jun 29, 2020 at 04:43:10PM -0700, Chaitanya Kulkarni wrote: Now that we have done cleanup we can safely get rid of

Re: [dm-devel] [PATCH 10/11] block: use block_bio class for getrq and sleeprq

2020-07-01 Thread Chaitanya Kulkarni
On 6/30/20 11:19 PM, Christoph Hellwig wrote: > On Wed, Jul 01, 2020 at 04:45:03AM +, Chaitanya Kulkarni wrote: >> On 6/29/20 10:13 PM, Christoph Hellwig wrote: >>> On Mon, Jun 29, 2020 at 04:43:13PM -0700, Chaitanya Kulkarni wrote: The only difference in block_get_rq and block_bio was

Re: [dm-devel] [PATCH v2 7/7] multipath: add option to skip multipathd delegation

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > Add the -D option to allow users to skip delegating commands to > multipathd. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck > --- > libmultipath/config.h | 1 + > multipath/main.c | 8 +++- > 2 files

Re: [dm-devel] [PATCH v2 6/7] multipath: delegate flushing maps to multipathd

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > Since there can be problems with removing maps outside of multipathd, > multipath should attempt to delegate this command to multipathd. > However, multipathd doesn't attempt to suspend the device, in order > to avoid potential hangs.

Re: [dm-devel] [PATCH v2 4/7] multipathd: add "del maps" multipathd command

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > This will flush all multipath devices. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-18 at 18:06 -0500, Benjamin Marzinski wrote: > > I uploaded the test program, aio_test: > > https://github.com/bmarzins/test_programs.git > > You just need to run in on a queueing multipath device with no active > paths and an open count of 0. It will hang with the device open.

Re: [dm-devel] [PATCH v2 2/7] multipathd: fix check_path errors with removed map

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > If a multipath device is removed during, or immediately before the > call > to check_path(), multipathd can behave incorrectly. A missing > multpath > device will cause update_multipath_strings() to fail, setting > pp->dmstate to

Re: [dm-devel] [PATCH v2 1/7] libmultipath: make dm_get_map/status return codes symbolic

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > dm_get_map() and dm_get_status() now use symbolic return codes. They > also differentiate between failing to get information from device- > mapper > and not finding the requested device. These symboilc return codes are > also used by

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-01 Thread Matthew Wilcox
On Wed, Jul 01, 2020 at 06:57:47PM +0100, Matthew Wilcox wrote: > On Wed, Jul 01, 2020 at 12:41:03PM -0400, Mike Snitzer wrote: > > On Wed, Jul 01 2020 at 5:06am -0400, > > Christoph Hellwig wrote: > > > > > Hi Jens, > > > > > > we have a lot of bdi congestion related code that is left around

Re: [dm-devel] [PATCH 10/20] dm: stop using ->queuedata

2020-07-01 Thread Mike Snitzer
On Wed, Jul 01 2020 at 4:59am -0400, Christoph Hellwig wrote: > Instead of setting up the queuedata as well just use one private data > field. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-01 Thread Matthew Wilcox
On Wed, Jul 01, 2020 at 12:41:03PM -0400, Mike Snitzer wrote: > On Wed, Jul 01 2020 at 5:06am -0400, > Christoph Hellwig wrote: > > > Hi Jens, > > > > we have a lot of bdi congestion related code that is left around without > > any use. This series removes it in preparation of sorting out the

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-01 Thread Mike Snitzer
On Wed, Jul 01 2020 at 5:06am -0400, Christoph Hellwig wrote: > Hi Jens, > > we have a lot of bdi congestion related code that is left around without > any use. This series removes it in preparation of sorting out the bdi > lifetime rules properly. I could do some git archeology to see what

[dm-devel] NVMe regression, NVMe no longer uses blk_path_error()

2020-07-01 Thread Mike Snitzer
IF NVMe's isn't a primary user of blk_path_error() it largely kills the entire point of blk_path_error(). (And no the response to this must not be: "that's fine") This commit shows NVMe's previous continued use of blk_path_error(): 8decf5d5b9f3f7 ("nvme: remove nvme_req_needs_failover") but

Re: [dm-devel] [PATCH 4/4] writeback: remove bdi->congested_fn

2020-07-01 Thread David Sterba
On Wed, Jul 01, 2020 at 11:06:22AM +0200, Christoph Hellwig wrote: > Except for pktdvd, the only places setting congested bits are file > systems that allocate their own backing_dev_info structures. And > pktdvd is a deprecated driver that isn't useful in stack setup > either. So remove the dead

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-01 Thread Tejun Heo
On Wed, Jul 01, 2020 at 11:06:18AM +0200, Christoph Hellwig wrote: > Hi Jens, > > we have a lot of bdi congestion related code that is left around without > any use. This series removes it in preparation of sorting out the bdi > lifetime rules properly. Acked-by: Tejun Heo Thanks a lot for

Re: [dm-devel] rename ->make_request_fn and move it to the block_device_operations v2

2020-07-01 Thread Jens Axboe
On 7/1/20 2:59 AM, Christoph Hellwig wrote: > Hi Jens, > > this series moves the make_request_fn method into block_device_operations > with the much more descriptive ->submit_bio name. It then also gives > generic_make_request a more descriptive name, and further optimize the > path to issue to

Re: [dm-devel] [PATCH 6/6] mm: Add memalloc_nowait

2020-07-01 Thread Mike Rapoport
On Wed, Jul 01, 2020 at 07:53:46AM +0200, Michal Hocko wrote: > On Wed 01-07-20 05:12:03, Matthew Wilcox wrote: > > On Tue, Jun 30, 2020 at 08:34:36AM +0200, Michal Hocko wrote: > > > On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: > > > [...] > > > > The documentation is hard to add a new case

[dm-devel] [PATCH 2/4] writeback: remove {set,clear}_wb_congested

2020-07-01 Thread Christoph Hellwig
Just merge them into their only callers. Signed-off-by: Christoph Hellwig --- include/linux/backing-dev-defs.h | 14 ++ mm/backing-dev.c | 12 ++-- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/include/linux/backing-dev-defs.h

[dm-devel] [PATCH 1/4] drbd: remove a bogus bdi_rw_congested call

2020-07-01 Thread Christoph Hellwig
bdi_rw_congested returns congestion state, so calling it without looking at the return value doesn't make much sense. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_proc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/drbd/drbd_proc.c

[dm-devel] [PATCH 4/4] writeback: remove bdi->congested_fn

2020-07-01 Thread Christoph Hellwig
Except for pktdvd, the only places setting congested bits are file systems that allocate their own backing_dev_info structures. And pktdvd is a deprecated driver that isn't useful in stack setup either. So remove the dead congested_fn stacking infrastructure. Signed-off-by: Christoph Hellwig

[dm-devel] [PATCH 3/4] writeback: remove struct bdi_writeback_congested

2020-07-01 Thread Christoph Hellwig
We never set any congested bits in the group writeback instances of it. And for the simpler bdi-wide case a simple scalar field is all that that is needed. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 19 +--- drivers/md/dm.c | 2 +-

[dm-devel] remove dead bdi congestion leftovers

2020-07-01 Thread Christoph Hellwig
Hi Jens, we have a lot of bdi congestion related code that is left around without any use. This series removes it in preparation of sorting out the bdi lifetime rules properly. Diffstat: block/blk-cgroup.c | 19 drivers/block/drbd/drbd_main.c | 59 --

[dm-devel] [PATCH 07/20] umem: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 1e2aa5ae27963c..5498f1cf36b3fe 100644

[dm-devel] [PATCH 17/20] block: rename generic_make_request to submit_bio_noacct

2020-07-01 Thread Christoph Hellwig
generic_make_request has always been very confusingly misnamed, so rename it to submit_bio_noacct to make it clear that it is submit_bio minus accounting and a few checks. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +-

[dm-devel] [PATCH 02/20] simdisk: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- arch/xtensa/platforms/iss/simdisk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c

[dm-devel] [PATCH 14/20] block: remove the NULL queue check in generic_make_request_checks

2020-07-01 Thread Christoph Hellwig
All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index

[dm-devel] [PATCH 10/20] dm: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index e44473fe0f4873..c8d91f271c272e 100644 ---

[dm-devel] [PATCH 08/20] zram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index

[dm-devel] [PATCH 12/20] block: remove the request_queue argument from blk_queue_split

2020-07-01 Thread Christoph Hellwig
The queue can be trivially derived from the bio, so pass one less argument. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 21 ++--- block/blk-mq.c| 2 +- block/blk.h | 3 +-- drivers/block/drbd/drbd_req.c | 2 +-

[dm-devel] [PATCH 13/20] block: tidy up a warning in bio_check_ro

2020-07-01 Thread Christoph Hellwig
The "generic_make_request: " prefix has no value, and will soon become stale. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 76cfd5709f66cd..95dca74534ff73 100644 ---

[dm-devel] [PATCH 11/20] fs: remove a weird comment in submit_bh_wbc

2020-07-01 Thread Christoph Hellwig
All bios can get remapped if submitted to partitions. No need to comment on that. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 64fe82ec65ff1f..2725ebbcfdc246 100644 --- a/fs/buffer.c +++ b/fs/buffer.c

[dm-devel] [PATCH 16/20] block: move ->make_request_fn to struct block_device_operations

2020-07-01 Thread Christoph Hellwig
The make_request_fn is a little weird in that it sits directly in struct request_queue instead of an operation vector. Replace it with a block_device_operations method called submit_bio (which describes much better what it does). Also remove the request_queue argument to it, as the queue can be

[dm-devel] [PATCH 09/20] bcache: stop setting ->queuedata

2020-07-01 Thread Christoph Hellwig
Nothing in bcache actually uses the ->queuedata field. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2014016f9a60d3..21aa168113d30b 100644 ---

[dm-devel] [PATCH 15/20] block: remove the nr_sectors variable in generic_make_request_checks

2020-07-01 Thread Christoph Hellwig
The variable is only used once, so just open code the bio_sector() there. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 37435d0d433564..28f60985dc75cc 100644 ---

[dm-devel] [PATCH 01/20] nfblock: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/emu/nfblock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/m68k/emu/nfblock.c

[dm-devel] [PATCH 05/20] ps3vram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/ps3vram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 821d4d8b1d763e..5a1d1d137c7248

[dm-devel] [PATCH 18/20] block: refator submit_bio_noacct

2020-07-01 Thread Christoph Hellwig
Split out a __submit_bio_noacct helper for the actual de-recursion algorithm, and simplify the loop by using a continue when we can't enter the queue for a bio. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 143 +-- 1 file changed, 75

[dm-devel] rename ->make_request_fn and move it to the block_device_operations v2

2020-07-01 Thread Christoph Hellwig
Hi Jens, this series moves the make_request_fn method into block_device_operations with the much more descriptive ->submit_bio name. It then also gives generic_make_request a more descriptive name, and further optimize the path to issue to blk-mq, removing the need for the direct_make_request

[dm-devel] [PATCH 03/20] drbd: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_req.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c

[dm-devel] [PATCH 04/20] null_blk: stop using ->queuedata for bio mode

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index

[dm-devel] [PATCH 06/20] rsxx: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index

[dm-devel] [PATCH 19/20] block: shortcut __submit_bio_noacct for blk-mq drivers

2020-07-01 Thread Christoph Hellwig
For blk-mq drivers bios can only be inserted for the same queue. So bypass the complicated sorting logic in __submit_bio_noacct with a blk-mq simpler submission helper. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 30 ++ 1 file changed, 30 insertions(+)

[dm-devel] [PATCH 20/20] block: remove direct_make_request

2020-07-01 Thread Christoph Hellwig
Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 28 drivers/md/dm.c | 5 + drivers/nvme/host/multipath.c | 2 +-

Re: [dm-devel] [PATCH 0/6] crypto: add CRYPTO_ALG_ALLOCATES_MEMORY

2020-07-01 Thread Mikulas Patocka
Thanks for cleaning this up. Mikulas On Tue, 30 Jun 2020, Eric Biggers wrote: > This series introduces a flag that algorithms can set to indicate that > they allocate memory during processing of typical inputs, and thus > shouldn't be used in cases like dm-crypt where memory allocation >

Re: [dm-devel] [PATCH 10/11] block: use block_bio class for getrq and sleeprq

2020-07-01 Thread Christoph Hellwig
On Wed, Jul 01, 2020 at 04:45:03AM +, Chaitanya Kulkarni wrote: > On 6/29/20 10:13 PM, Christoph Hellwig wrote: > > On Mon, Jun 29, 2020 at 04:43:13PM -0700, Chaitanya Kulkarni wrote: > >> The only difference in block_get_rq and block_bio was the last param > >> passed __entry->nr_sector &

Re: [dm-devel] [PATCH 07/11] block: get rid of blk_trace_request_get_cgid()

2020-07-01 Thread Christoph Hellwig
On Wed, Jul 01, 2020 at 04:38:06AM +, Chaitanya Kulkarni wrote: > On 6/29/20 10:12 PM, Christoph Hellwig wrote: > > On Mon, Jun 29, 2020 at 04:43:10PM -0700, Chaitanya Kulkarni wrote: > >> Now that we have done cleanup we can safely get rid of the > >> blk_trace_request_get_cgid() and replace