Re: [dm-devel] [PATCH 4/5] Match FREE and MALLOC/STRDUP/REALLOC

2021-11-17 Thread lixiaokeng
On 2021/11/18 8:47, Benjamin Marzinski wrote: > On Tue, Nov 16, 2021 at 10:00:53PM +0800, lixiaokeng wrote: >> In _DEBUG_ mode, MALLOC/STRDUP/REALLOC and FREE will record >> the memory usage. Match them. > > This looks fine, but personally, I'd rather just have all the DEBUG > memory code remov

Re: [dm-devel] [PATCH 1/5] Fix potential null pointer dereference

2021-11-17 Thread lixiaokeng
>> @@ -388,8 +388,10 @@ sysfs_get_tgt_nodename(struct path *pp, char *node) >> if (value && !strcmp(value, "usb")) { >> pp->sg_id.proto_id = SCSI_PROTOCOL_USB; >> tgtname = udev_device_get_sysname(tgtdev); >> -strlcpy(nod

Re: [dm-devel] [PATCH 4/5] Match FREE and MALLOC/STRDUP/REALLOC

2021-11-17 Thread Benjamin Marzinski
On Tue, Nov 16, 2021 at 10:00:53PM +0800, lixiaokeng wrote: > In _DEBUG_ mode, MALLOC/STRDUP/REALLOC and FREE will record > the memory usage. Match them. This looks fine, but personally, I'd rather just have all the DEBUG memory code removed. If people want to check memory usage, there's always va

Re: [dm-devel] [PATCH 2/5] remove unnecessary memset

2021-11-17 Thread Benjamin Marzinski
On Tue, Nov 16, 2021 at 09:59:41PM +0800, lixiaokeng wrote: > MALLOC will set memory zero. memset is unnecessary. > Remove it. > > Signed-off-by: Lixiaokeng Reviewed-by: Benjamin Marzinski > --- > libmultipath/log.c | 1 - > multipathd/waiter.c | 1 - > 2 files changed, 2 deletions(-) > > dif

Re: [dm-devel] [PATCH 3/5] remove unnecessary free

2021-11-17 Thread Benjamin Marzinski
On Tue, Nov 16, 2021 at 10:00:09PM +0800, lixiaokeng wrote: > arg will be free by cleanup_charp. FREE(args) > is unnecessary before return. Remove it. > > Signed-off-by: Lixiaokeng Reviewed-by: Benjamin Marzinski > --- > libmultipath/prioritizers/weightedpath.c | 3 +-- > 1 file changed, 1 inse

[dm-devel] [PATCH v3 4/4] multipathd: add "reconfigure all" command.

2021-11-17 Thread Benjamin Marzinski
With this commit, multipathd no longer defaults to full reconfigures for the "reconfigure" command and the HUP signal. The default is a weak reconfigure. A new command, "reconfigure all", has been added to do a full reconfigure. Signed-off-by: Benjamin Marzinski --- multipath/main.c |

[dm-devel] [PATCH v3 3/4] multipathd: pass in the type of reconfigure

2021-11-17 Thread Benjamin Marzinski
schedule_reconfigure() now takes the type of reconfigure to do, and that gets passed down to reconfigure(). If a full reconfigure has already been requested but not started, weak reconfigure requests will be upgraded. Currently cli_reconfigure() and the HUP signal request full reconfigures, while t

[dm-devel] [PATCH v3 2/4] multipathd: remove reconfigure from header file.

2021-11-17 Thread Benjamin Marzinski
Only multipathd/main.c uses it. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multipathd/main.h b/multipathd/main.h index 23ce919e..a1697a74 100644 --- a/multipathd/main.h +++ b/multipathd/main.h @@ -39,7 +39

[dm-devel] [PATCH v3 1/4] multipathd: move delayed_reconfig out of struct config

2021-11-17 Thread Benjamin Marzinski
delayed_reconfig was inside the config struct, but it wasn't updated during an RCU write section, so there's no synchronization on it. Instead, pull it out of the config structure, and use the config_lock to synchronize it. Signed-off-by: Benjamin Marzinski --- libmpathpersist/libmpathpersist.ve

[dm-devel] [PATCH v3 0/4] Add "reconfigure all" multipath command

2021-11-17 Thread Benjamin Marzinski
This patchset is supposed to replace Martin's multipathd: add "force_reconfigure" option patch from his uxlsnr overhaul patchset. It also makes the default reconfigure be a weak reconfigure, but instead of adding a configuration option to control this, it adds a new multipathd command, "reconfigu

Re: [dm-devel] [PATCH v2 0/4] Add "reconfigure all" multipath command

2021-11-17 Thread Benjamin Marzinski
On Wed, Nov 17, 2021 at 08:50:55PM +, Martin Wilck wrote: > On Wed, 2021-11-17 at 14:33 -0600, Benjamin Marzinski wrote: > > > > Changes from v1 as suggested by Martin Wilck: > > > > 0001: update libmultipath.version to handle ABI change in struct > > config > > 0003: Clarify commit message >

[dm-devel] [PATCH v2 2/9] libmultipath: skip unneeded steps to get path name

2021-11-17 Thread Benjamin Marzinski
The path already must have a udev device at this point, so it just needs to copy the sysname from it. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/structs_vec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmultipath/structs_vec.c b/

[dm-devel] [PATCH v2 1/9] multipathd: remove missing paths on startup

2021-11-17 Thread Benjamin Marzinski
If a path device was removed from the system while multipathd was not running, multipathd would not remove the path from the multipath table on start-up, or on a weak reconfigure. update_pathvec_from_dm() would return that a reload was necessary, but that information wasn't propigated back to where

[dm-devel] [PATCH v2 8/9] multipathd: Remove dependency on systemd-udev-settle.service

2021-11-17 Thread Benjamin Marzinski
multipathd can now handle starting up with incompletely initialized paths, so it no longer needs to wait for the device Coldplug to complete. However multipathd may need to write to /etc (for the wwids and bindings files), so in needs to wait for the root filesystem to be remounted read/write befor

[dm-devel] [PATCH v2 5/9] multipathd: fully initialize paths added by update_pathvec_from_dm

2021-11-17 Thread Benjamin Marzinski
When paths are added by update_pathvec_from_dm(), udev may not have initialized them. This means that it's possible that they are supposed to be blacklisted by udev properties, but weren't. Also, in order to avoid doing potentially stalling IO, update_pathvec_from_dm() doesn't get all the path inf

[dm-devel] [PATCH v2 3/9] libmultipath: don't use fallback wwid in update_pathvec_from_dm

2021-11-17 Thread Benjamin Marzinski
When new paths are added in update_pathvec_from_dm(). If they can't get their regular wwid, they shouldn't try the getting the fallback wwid, and should just copy the wwid of the multipath device. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/discovery.c | 7 +++

[dm-devel] [PATCH v2 9/9] libmultipath: add path wildcard "%I" for init state

2021-11-17 Thread Benjamin Marzinski
From: Martin Wilck Enable printing pp->initialized with 'multipathd show paths format "%I"'. This is supposed to go on top of Ben's "multipathd: remove udev settle dependency" series, to simplify checking multipathd's state. Reviewed-by: Benjamin Marzinski --- libmultipath/print.c | 21 +

[dm-devel] [PATCH v2 4/9] libmultipath: always set INIT_REMOVED in set_path_removed

2021-11-17 Thread Benjamin Marzinski
Avoiding this corner case simplifies a future patch Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/structs_vec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index d363e7f6..fb26437a

[dm-devel] [PATCH v2 6/9] multipathd: retrigger uevent for partial paths

2021-11-17 Thread Benjamin Marzinski
If a partial path appears and is not fully initialized within 180 seconds, trigger a uevent. If the udev device is not initialized trigger an add event. Otherwise, trigger a change event. Signed-off-by: Benjamin Marzinski --- libmultipath/libmultipath.version | 2 +- libmultipath/structs.h

[dm-devel] [PATCH v2 7/9] multipathd: remove INIT_PARTIAL paths that aren't in a multipath device

2021-11-17 Thread Benjamin Marzinski
The only reason multipath is monitoring an INIT_PARTIAL path is because it was discovered in a multipath device table. If it stops being part of a multipath device before it gets fully initialized, drop it. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/structs_vec

[dm-devel] [PATCH v2 0/9] multipathd: remove udev settle dependency

2021-11-17 Thread Benjamin Marzinski
So, it turns out that commit 4ef67017 "libmultipath: add update_pathvec_from_dm()" already does most of the hard work of making multipath handle the uninitialized paths that exist during boot, after the switch root, but before the all the coldplug uevents have been processed. The only problem is th

Re: [dm-devel] [PATCH v2 0/4] Add "reconfigure all" multipath command

2021-11-17 Thread Benjamin Marzinski
On Wed, Nov 17, 2021 at 08:50:55PM +, Martin Wilck wrote: > On Wed, 2021-11-17 at 14:33 -0600, Benjamin Marzinski wrote: > > > > Changes from v1 as suggested by Martin Wilck: > > > > 0001: update libmultipath.version to handle ABI change in struct > > config > > 0003: Clarify commit message >

[dm-devel] [PATCH v2 3/4] multipathd: pass in the type of reconfigure

2021-11-17 Thread Benjamin Marzinski
schedule_reconfigure() now takes the type of reconfigure to do, and that gets passed down to reconfigure(). If a full reconfigure has already been requested but not started, weak reconfigure requests will be upgraded. Currently cli_reconfigure() and the HUP signal request full reconfigures, while t

[dm-devel] [PATCH v2 4/4] multipathd: add "reconfigure all" command.

2021-11-17 Thread Benjamin Marzinski
With this commit, multipathd no longer defaults to full reconfigures for the "reconfigure" command and the HUP signal. The default is a weak reconfigure. A new command, "reconfigure all", has been added to do a full reconfigure. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- mu

[dm-devel] [PATCH v2 1/4] multipathd: move delayed_reconfig out of struct config

2021-11-17 Thread Benjamin Marzinski
delayed_reconfig was inside the config struct, but it wasn't updated during an RCU write section, so there's no synchronization on it. Instead, pull it out of the config structure, and use the config_lock to synchronize it. Signed-off-by: Benjamin Marzinski --- libmpathpersist/libmpathpersist.ve

[dm-devel] [PATCH v2 0/4] Add "reconfigure all" multipath command

2021-11-17 Thread Benjamin Marzinski
This patchset is supposed to replace Martin's multipathd: add "force_reconfigure" option patch from his uxlsnr overhaul patchset. It also makes the default reconfigure be a weak reconfigure, but instead of adding a configuration option to control this, it adds a new multipathd command, "reconfigu

[dm-devel] [PATCH v2 2/4] multipathd: remove reconfigure from header file.

2021-11-17 Thread Benjamin Marzinski
Only multipathd/main.c uses it. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multipathd/main.h b/multipathd/main.h index 23ce919e..a1697a74 100644 --- a/multipathd/main.h +++ b/multipathd/main.h @@ -39,7 +39

Re: [dm-devel] [PATCH 3/3] multipath-tools: support generating compile_commands.json

2021-11-17 Thread Benjamin Marzinski
On Fri, Nov 12, 2021 at 10:05:51PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > This file is necessary to run clangd as helper for an IDE, e.g. > with emacs lsp-mode. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > .gitignore | 1 + > Makefile | 6 ++ >

Re: [dm-devel] [PATCH 1/3] multipath-tools: support ABI testing with libabigail

2021-11-17 Thread Benjamin Marzinski
On Fri, Nov 12, 2021 at 10:05:49PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > Use abidw and abidiff (https://sourceware.org/libabigail/) to > generate a formal representation of our ABI, and check for changes. > This will reduce the amount of attention required to detect and > track l

Re: [dm-devel] [PATCH 2/3] multipath-tools: add github workflow to save and check ABI

2021-11-17 Thread Benjamin Marzinski
On Fri, Nov 12, 2021 at 10:05:50PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > This adds a workflow that saves the ABI of libmultipath and the > other libraries, and optionally tests it against a known-good state, > which is taken from the configurable ABI_BRANCH. If the ABI differs, >

Re: [dm-devel] [PATCH 1/5] Fix potential null pointer dereference

2021-11-17 Thread Benjamin Marzinski
On Tue, Nov 16, 2021 at 09:59:14PM +0800, lixiaokeng wrote: > udev_device_* may return NULL, check it. > > Signed-off-by: Lixiaokeng > --- > libmultipath/discovery.c| 8 +--- > libmultipath/foreign/nvme.c | 4 +++- > libmultipath/util.c | 10 +- > 3 files changed, 17 in

Re: [PATCH 01/29] nvdimm/pmem: move dax_attribute_group from dax to pmem

2021-11-17 Thread Dan Williams
On Tue, Nov 9, 2021 at 12:33 AM Christoph Hellwig wrote: > > dax_attribute_group is only used by the pmem driver, and can avoid the > completely pointless lookup by the disk name if moved there. This > leaves just a single caller of dax_get_by_host, so move dax_get_by_host > into the same ifdef b

Re: [PATCH 03/29] dax: remove CONFIG_DAX_DRIVER

2021-11-17 Thread Dan Williams
On Tue, Nov 9, 2021 at 12:33 AM Christoph Hellwig wrote: > > CONFIG_DAX_DRIVER only selects CONFIG_DAX now, so remove it. Applied.

Re: [PATCH 07/29] xfs: factor out a xfs_setup_dax_always helper

2021-11-17 Thread Darrick J. Wong
On Tue, Nov 09, 2021 at 09:32:47AM +0100, Christoph Hellwig wrote: > Factor out another DAX setup helper to simplify future changes. Also > move the experimental warning after the checks to not clutter the log > too much if the setup failed. > > Signed-off-by: Christoph Hellwig Reviewed-by: Dar

Re: [PATCH 02/29] dm: make the DAX support dependend on CONFIG_FS_DAX

2021-11-17 Thread Dan Williams
On Tue, Nov 9, 2021 at 12:33 AM Christoph Hellwig wrote: > > The device mapper DAX support is all hanging off a block device and thus > can't be used with device dax. Make it depend on CONFIG_FS_DAX instead > of CONFIG_DAX_DRIVER. This also means that bdev_dax_pgoff only needs to > be built unde

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-11-17 Thread Bart Van Assche
On 11/17/21 04:53, Javier González wrote: Thanks for sharing this. We will make sure that DM / MD are supported and then we can cover examples. Hopefully, you guys can help with the bits for dm-crypt to make the decision to offload when it make sense. Will ask around to learn who should work on