Re: [PATCH v2 7/7] multipath-tools: Makefile.inc: set _FILE_OFFSET_BITS=64

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:35AM +0100, Martin Wilck wrote: > Set _FILE_OFFSET_BITS=64 in order to avoid EOVERFLOW error for getdents() > syscalls on some file systems (in particular, ext4) in emultated 32bit > environments on 64 bit kernel, e.g. when running in qemu. This error occured > in arm/

Re: [PATCH v2 6/7] 11-dm-mpath.rules: Don't force activation while device is suspended

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:34AM +0100, Martin Wilck wrote: > If paths become available while the device is suspended, don't > activate. Another uevent will arrive when the device is resumed. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath/11-dm-mpath.rules.i

Re: [PATCH v2 5/7] 11-dm-mpath.rules: clear DM_DISABLE_OTHER_RULES_FLAG for coldplug events

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:33AM +0100, Martin Wilck wrote: > For all "spurious" events, which includes coldplug events, > DM_DISABLE_OTHER_RULES_FLAG will be read from the udev DB in > 10-dm.rules. Thus if a previous event saw the device in suspended > state, the flag will be set even if the dev

Re: [PATCH v2 4/7] 11-dm-mpath.rules: don't save DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:32AM +0100, Martin Wilck wrote: > The current rules overwrite DM_UDEV_DISABLE_OTHER_RULES_FLAG and save its > value in DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD if MPATH_DEVICE_READY changes > from 1 to 0, and restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from > DM_UDEV_DISABLE_

Re: [PATCH v2 3/7] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:31AM +0100, Martin Wilck wrote: > If a map reload happens while udev is processing rules for a coldplug > event, DM_SUSPENDED may be set if the respective test in 10-dm.rules > happens while the device is suspened. This will cause the rules for all > higher block devic

Re: [PATCH v2 2/7] 11-dm-mpath.rules: don't import DM_UDEV_DISABLE_OTHER_RULES_FLAG

2024-02-09 Thread Benjamin Marzinski
On Sat, Feb 10, 2024 at 12:27:30AM +0100, Martin Wilck wrote: > DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which imports > it from db if necessary. There is no need to do this again here. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipath/11-dm-mp

Re: [PATCH 25/26] block: Reduce zone write plugging memory usage

2024-02-09 Thread Damien Le Moal
On 2/10/24 04:36, Bart Van Assche wrote: > On 2/8/24 19:58, Damien Le Moal wrote: >> We still need to keep in memory the write pointer offset of zones that are >> not >> being actively written to but have been previously partially written. So I do >> not see how excluding empty and full zones from

[PATCH v2 7/7] multipath-tools: Makefile.inc: set _FILE_OFFSET_BITS=64

2024-02-09 Thread Martin Wilck
Set _FILE_OFFSET_BITS=64 in order to avoid EOVERFLOW error for getdents() syscalls on some file systems (in particular, ext4) in emultated 32bit environments on 64 bit kernel, e.g. when running in qemu. This error occured in arm/v7 CI runs on Ubuntu runners on GitHub, which can be enabled after app

[PATCH v2 6/7] 11-dm-mpath.rules: Don't force activation while device is suspended

2024-02-09 Thread Martin Wilck
If paths become available while the device is suspended, don't activate. Another uevent will arrive when the device is resumed. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/multipath/11-dm-mpath.ru

[PATCH v2 5/7] 11-dm-mpath.rules: clear DM_DISABLE_OTHER_RULES_FLAG for coldplug events

2024-02-09 Thread Martin Wilck
For all "spurious" events, which includes coldplug events, DM_DISABLE_OTHER_RULES_FLAG will be read from the udev DB in 10-dm.rules. Thus if a previous event saw the device in suspended state, the flag will be set even if the device has meanwhile resumed. Reset the flag if none of the conditions ho

[PATCH v2 4/7] 11-dm-mpath.rules: don't save DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD

2024-02-09 Thread Martin Wilck
The current rules overwrite DM_UDEV_DISABLE_OTHER_RULES_FLAG and save its value in DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD if MPATH_DEVICE_READY changes from 1 to 0, and restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD when MPATH_DEVICE_READY changes back from 0 to 1.

[PATCH v2 3/7] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Martin Wilck
If a map reload happens while udev is processing rules for a coldplug event, DM_SUSPENDED may be set if the respective test in 10-dm.rules happens while the device is suspened. This will cause the rules for all higher block device layers to be skipped. Record this situation in an udev property. The

[PATCH v2 2/7] 11-dm-mpath.rules: don't import DM_UDEV_DISABLE_OTHER_RULES_FLAG

2024-02-09 Thread Martin Wilck
DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which imports it from db if necessary. There is no need to do this again here. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/11-dm-mpath.rule

[PATCH v2 1/7] 11-dm-mpath.rules: use import logic like 13-dm-disk.rules

2024-02-09 Thread Martin Wilck
We have to import the properties if either DM_NOSCAN or DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped in both cases. Also, if DM_UDEV_PRIMARY_SOURCE_FLAG is not set, it makes no sense to try and import the properties. Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski

[PATCH v2 0/7] udev rule and CI improvements

2024-02-09 Thread Martin Wilck
Changes wrt v1: 2/7: This patch becomes trivial, DM_UDEV_DISABLE_OTHER_RULES_FLAG is not imported any more, and my previous statement that DM_NOPATH might be set in an earlier rule was wrong; the test whether it's already set is dropped. 3/7: looks different now because of the change

Re: [PATCH v5 00/14] dm-raid/md/raid: fix v6.7 regressions

2024-02-09 Thread Song Liu
On Thu, Feb 8, 2024 at 3:17 PM Benjamin Marzinski wrote: > [...] > > > > I am not able to get reliable results from shell/lvconvert-repair-raid.sh > > either. For 6.6.0 kernel, the test fails. On 6.8-rc1 kernel, the test fails > > sometimes. > > > > Could you please share more information about yo

About DM_UDEV_DISABLE_OTHER_RULES_FLAG and DM_NOSCAN

2024-02-09 Thread Martin Wilck
Hi Zdenek, Peter, David, Ben, I have been pondering the device-mapper udev rules a lot lately, and I believe I have found glitches in the logic of the device mapper udev flags that I'd like to bring to your attention. TL;DR: change I propose: * use DM_DISABLE_OTHER_RULES_FLAG consistently as a f

Re: [PATCH 25/26] block: Reduce zone write plugging memory usage

2024-02-09 Thread Bart Van Assche
On 2/8/24 19:58, Damien Le Moal wrote: We still need to keep in memory the write pointer offset of zones that are not being actively written to but have been previously partially written. So I do not see how excluding empty and full zones from that tracking simplifies anything at all. And the uni

[PATCH] [RFQ] dm-integrity: Add a lazy commit mode for journal

2024-02-09 Thread Simone Weiß
Extend the dm-integrity driver to omit writing unused journal data sectors. Instead of filling up the whole journal section, mark the last used sector with a special commit ID. The commit ID still uses the same base value, but section number and sector number are inverted. At replay when commit IDs

Re: [PATCH 3/6] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Benjamin Marzinski
On Fri, Feb 09, 2024 at 05:55:10PM +0100, Martin Wilck wrote: > If a map reload happens while udev is processing rules for a coldplug > event, DM_SUSPENDED may be set if the respective test in 10-dm.rules > happens while the device is suspened. This will cause the rules for all > higher block devic

Re: [PATCH 2/6] 11-dm-mpath.rules: don't import properties that are already set

2024-02-09 Thread Martin Wilck
On Fri, 2024-02-09 at 13:01 -0500, Benjamin Marzinski wrote: > On Fri, Feb 09, 2024 at 05:55:09PM +0100, Martin Wilck wrote: > > DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which > > imports > > it from db if necessary. There is no need to do this again here. > > > > DM_NOSCAN may

Re: [PATCH 2/6] 11-dm-mpath.rules: don't import properties that are already set

2024-02-09 Thread Benjamin Marzinski
On Fri, Feb 09, 2024 at 05:55:09PM +0100, Martin Wilck wrote: > DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which imports > it from db if necessary. There is no need to do this again here. > > DM_NOSCAN may be already set from previous rules, e.g. if the device is > suspended. Make

Re: [PATCH 4/6] 11-dm-mpath.rules: don't save DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD

2024-02-09 Thread Martin Wilck
On Fri, 2024-02-09 at 17:55 +0100, Martin Wilck wrote: > > diff --git a/multipath/z0-dm-mpath-late.rules b/multipath/z0-dm- > mpath-late.rules > new file mode 100644 > index 000..58411ca > --- /dev/null > +++ b/multipath/z0-dm-mpath-late.rules > @@ -0,0 +1,4 @@ > +# If DM_UDEV_DISABLE_OTHER_RU

Re: [PATCH 1/6] 11-dm-mpath.rules: use import logic like 13-dm-disk.rules

2024-02-09 Thread Benjamin Marzinski
On Fri, Feb 09, 2024 at 05:55:08PM +0100, Martin Wilck wrote: > We have to import the properties if either DM_NOSCAN or > DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped > in both cases. Also, if DM_UDEV_PRIMARY_SOURCE_FLAG is not set, > it makes no sense to try and import the pro

[PATCH 6/6] multipath-tools: Makefile.inc: set _FILE_OFFSET_BITS=64

2024-02-09 Thread Martin Wilck
Set _FILE_OFFSET_BITS=64 in order to avoid EOVERFLOW error for getdents() syscalls on some file systems (in particular, ext4) in emultated 32bit environments on 64 bit kernel, e.g. when running in qemu. This error occured in arm/v7 CI runs on Ubuntu runners on GitHub, which can be enabled after app

[PATCH 5/6] 11-dm-mpath.rules: clear DM_DISABLE_OTHER_RULES_FLAG for coldplug events

2024-02-09 Thread Martin Wilck
For all "spurious" events, which includes coldplug events, DM_DISABLE_OTHER_RULES_FLAG will be read from the udev DB in 10-dm.rules. Thus if a previous event saw the device in suspended state, the flag will be set even if the device has meanwhile resumed. Reset the flag if none of the conditions ho

[PATCH 4/6] 11-dm-mpath.rules: don't save DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD

2024-02-09 Thread Martin Wilck
The current rules overwrite DM_UDEV_DISABLE_OTHER_RULES_FLAG and save its value in DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD if MPATH_DEVICE_READY changes from 1 to 0, and restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD when MPATH_DEVICE_READY changes back from 0 to 1.

[PATCH 3/6] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Martin Wilck
If a map reload happens while udev is processing rules for a coldplug event, DM_SUSPENDED may be set if the respective test in 10-dm.rules happens while the device is suspened. This will cause the rules for all higher block device layers to be skipped. Record this situation in an udev property. The

[PATCH 2/6] 11-dm-mpath.rules: don't import properties that are already set

2024-02-09 Thread Martin Wilck
DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which imports it from db if necessary. There is no need to do this again here. DM_NOSCAN may be already set from previous rules, e.g. if the device is suspended. Make sure we don't overwrite it. Signed-off-by: Martin Wilck --- multipat

[PATCH 1/6] 11-dm-mpath.rules: use import logic like 13-dm-disk.rules

2024-02-09 Thread Martin Wilck
We have to import the properties if either DM_NOSCAN or DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped in both cases. Also, if DM_UDEV_PRIMARY_SOURCE_FLAG is not set, it makes no sense to try and import the properties. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rule

[PATCH 0/6] udev rule and CI improvements

2024-02-09 Thread Martin Wilck
Patch 1-3 of this series are a v2 of my previous series "multipath-tools: udev rules and service improvements" posted on Feb 5th. Changes wrt v1: 1/6: fix logic as pointed out by Ben Marzinski 2/6: Keep importing MPATH_DEVICE_READY as suggested by Ben Marzinski. Don't import DM_UDEV_DISABL

Re: [PATCH 4/6] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Benjamin Marzinski
On Fri, Feb 09, 2024 at 04:53:50PM +0100, Martin Wilck wrote: > On Thu, 2024-02-08 at 20:03 -0500, Benjamin Marzinski wrote: > > On Mon, Feb 05, 2024 at 01:46:36PM +0100, Martin Wilck wrote: > > > If a map reload happens while udev is processing rules for a > > > coldplug > > > event, DM_SUSPENDED

Re: [PATCH 4/6] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Benjamin Marzinski
On Fri, Feb 09, 2024 at 04:53:50PM +0100, Martin Wilck wrote: > On Thu, 2024-02-08 at 20:03 -0500, Benjamin Marzinski wrote: > > On Mon, Feb 05, 2024 at 01:46:36PM +0100, Martin Wilck wrote: > > > If a map reload happens while udev is processing rules for a > > > coldplug > > > event, DM_SUSPENDED

Re: [PATCH 4/6] 11-dm-mpath.rules: handle reloads during coldplug events

2024-02-09 Thread Martin Wilck
On Thu, 2024-02-08 at 20:03 -0500, Benjamin Marzinski wrote: > On Mon, Feb 05, 2024 at 01:46:36PM +0100, Martin Wilck wrote: > > If a map reload happens while udev is processing rules for a > > coldplug > > event, DM_SUSPENDED may be set if the respective test in 10- > > dm.rules > > happens while

Re: [PATCH 3/6] 11-dm-mpath.rules: use import logic like 13-dm-disk.rules

2024-02-09 Thread Martin Wilck
On Thu, 2024-02-08 at 19:36 -0500, Benjamin Marzinski wrote: > On Mon, Feb 05, 2024 at 01:46:35PM +0100, Martin Wilck wrote: > > We have to import the properties if either DM_NOSCAN or > > DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped > > in both cases. Also, if DM_UDEV_PRIMARY_

Re: [PATCH 1/6] 11-dm-mpath.rules: don't import properties that are already set

2024-02-09 Thread Martin Wilck
On Thu, 2024-02-08 at 19:30 -0500, Benjamin Marzinski wrote: > On Tue, Feb 06, 2024 at 11:50:46AM +0100, Martin Wilck wrote: > > > > Unfortunately, testing of my patch series has shown that it's an > > improvement, but it isn't sufficient for completely avoiding races > > between multipathd and ud

[bug report] dm vdo: implement the chapter volume store

2024-02-09 Thread Dan Carpenter
Hello Matthew Sakai, The patch e08b7fe0c6fa: "dm vdo: implement the chapter volume store" from Nov 16, 2023 (linux-next), leads to the following Smatch static checker warning: drivers/md/dm-vdo/volume.c:597 process_entry() warn: inconsistent returns '&volume->read_threads_mutex'. Locked on :

[PATCH] dm vdo slab-depot: delete unnecessary check

2024-02-09 Thread Dan Carpenter
This is a duplicate check so it can't be true. Delete it. Signed-off-by: Dan Carpenter --- drivers/md/dm-vdo/slab-depot.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/dm-vdo/slab-depot.c b/drivers/md/dm-vdo/slab-depot.c index 42126bd60242..2f4a2ae5e082 100644 --- a/drivers/m

[bug report] dm vdo: add statistics reporting

2024-02-09 Thread Dan Carpenter
Hello Matthew Sakai, The patch 25479d97b12c: "dm vdo: add statistics reporting" from Nov 16, 2023 (linux-next), leads to the following (unpublished) Smatch static checker warning: drivers/md/dm-vdo/funnel-workqueue.c:545 vdo_dump_completion_to_buffer() warn: why check scnprintf return value? dri

[bug report] dm vdo: add flush support

2024-02-09 Thread Dan Carpenter
Hello Matthew Sakai, The patch 7d7084389ab3: "dm vdo: add flush support" from Nov 16, 2023 (linux-next), leads to the following Smatch static checker warning: drivers/md/dm-vdo/flush.c:114 allocate_flush() error: uninitialized symbol 'flush'. drivers/md/dm-vdo/flush.c 101 sta