Re: [dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone

2022-04-11 Thread Christoph Hellwig
On Mon, Apr 11, 2022 at 01:33:58PM -0400, Mike Snitzer wrote: > When bio_{alloc,init}_clone are passed a bdev, bio_init() will call > bio_associate_blkg() so the __bio_clone() work to initialize blkcg > isn't needed. No, unfortunately it isn't as simple as that. There are bios that do not use

Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-11 Thread Christoph Hellwig
On Mon, Apr 11, 2022 at 09:57:36PM -0700, Dan Williams wrote: > So how about change 'int flags' to 'enum dax_access_mode mode' where > dax_access_mode is: > > /** > * enum dax_access_mode - operational mode for dax_direct_access() > * @DAX_ACCESS: nominal access, fail / trim access on

Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-11 Thread Dan Williams
On Tue, Apr 5, 2022 at 12:48 PM Jane Chu wrote: > > Introduce DAX_RECOVERY flag to dax_direct_access(). The flag is > not set by default in dax_direct_access() such that the helper > does not translate a pmem range to kernel virtual address if the > range contains uncorrectable errors. When the

Re: [PATCH v7 5/6] pmem: refactor pmem_clear_poison()

2022-04-11 Thread Dan Williams
On Tue, Apr 5, 2022 at 12:48 PM Jane Chu wrote: > > Refactor the pmem_clear_poison() in order to share common code > later. > I would just add a note here about why, i.e. to factor out the common shared code between the typical write path and the recovery write path. > Signed-off-by: Jane Chu

[dm-devel] [PATCH 9/9] libmultipath: Add documentation for the protocol subsection

2022-04-11 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 38 ++ 1 file changed, 38 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 97695da4..dab1d58f 100644 --- a/multipath/multipath.conf.5 +++

[dm-devel] [PATCH 8/9] libmultipath: fix eh_deadline documentation

2022-04-11 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 4 1 file changed, 4 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 605b46e0..97695da4 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1636,6 +1636,8 @@

[dm-devel] [PATCH 7/9] libmultipath: add procotol subsection to overrides

2022-04-11 Thread Benjamin Marzinski
Add a procotol subsection to the overrides section, just like the one in the device subsection. This allows users to a protocol specific parameters to all device configurations. Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c| 76 --

[dm-devel] [PATCH 3/9] libmultipath: add a protocol subsection to multipath.conf

2022-04-11 Thread Benjamin Marzinski
Some storage arrays can be accessed using multiple protocols at the same time. In these cases, users may want to set path attributes differently, depending on the protocol that the path is using. To allow this, add a protocol subsection to the device subsection in multipath.conf, which allows

[dm-devel] [PATCH 5/9] libmultipath: check the hwentry pctable for path variables

2022-04-11 Thread Benjamin Marzinski
For the config values that exist in the proctol subsection of the device configs, paths will now also check the pctable when checking a hwentry for a value. Values in a matching pcentry will be used in preference to values in that hwentry. Signed-off-by: Benjamin Marzinski ---

[dm-devel] [PATCH 6/9] libmultipath: make snprint_pctable indent a variable amount

2022-04-11 Thread Benjamin Marzinski
Instead of always indenting two tabs, which is what is needed in for the protocol subsection of the device subsection, indent a variable amount. This will be needed in a future patch. Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 28 +--- 1 file changed,

[dm-devel] [PATCH 2/9] libmultipath: make protocol_name global

2022-04-11 Thread Benjamin Marzinski
Future patches will make use of this, so move it out of snprint_path_protocol() Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 17 - libmultipath/structs.c | 18 ++ libmultipath/structs.h | 1 + 3 files changed, 19 insertions(+), 17 deletions(-)

[dm-devel] [PATCH 1/9] libmultipath: steal the src string pointer in merge_str()

2022-04-11 Thread Benjamin Marzinski
Instead of allocating a copy when the original string is going to be freed right after the merge, just steal the pointer. Also, merge_mpe() can't get called with NULL arguments. Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 16 +--- 1 file changed, 5 insertions(+),

[dm-devel] [PATCH 4/9] libmultipath: Set the scsi timeout parameters by path

2022-04-11 Thread Benjamin Marzinski
Instead of dev_loss, fast_io_fail, and eh_deadline belonging to the multipath structure, have them belong to the path structure. This means that they are selected per path, and that sysfs_set_scsi_tmo() doesn't assume that all paths of a multipath device will have the same value. Currently they

[dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-11 Thread Benjamin Marzinski
Some storage arrays can be accessed using multiple protocols at the same time. I've have customers request the ability to set different values for the path specific timeouts, like fast_io_fail_tmo, based on the protocol used to access the path. In order to make this possible, this patchset adds a

Re: [dm-devel] [PATCH 1/3] dm: don't grab target io reference in dm_zone_map_bio

2022-04-11 Thread Ming Lei
On Tue, Apr 12, 2022 at 09:28:46AM +0900, Damien Le Moal wrote: > On 4/12/22 09:09, Ming Lei wrote: > > On Tue, Apr 12, 2022 at 08:33:04AM +0900, Damien Le Moal wrote: > >> On 4/11/22 23:18, Ming Lei wrote: > >> This fixes the issue: > >> > >> diff --git a/drivers/md/dm.c

Re: [dm-devel] [PATCH 1/3] dm: don't grab target io reference in dm_zone_map_bio

2022-04-11 Thread Ming Lei
On Tue, Apr 12, 2022 at 08:33:04AM +0900, Damien Le Moal wrote: > On 4/11/22 23:18, Ming Lei wrote: > This fixes the issue: > > diff --git a/drivers/md/dm.c b/drivers/md/dm.c > index 3c5fad7c4ee6..3dd6735450c5 100644 > --- a/drivers/md/dm.c > +++ b/drivers/md/dm.c >

Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-11 Thread Dan Williams
On Tue, Apr 5, 2022 at 12:48 PM Jane Chu wrote: > > Introduce DAX_RECOVERY flag to dax_direct_access(). The flag is > not set by default in dax_direct_access() such that the helper > does not translate a pmem range to kernel virtual address if the > range contains uncorrectable errors. When the

Re: [dm-devel] [PATCH] dm mpath: fixup sched_clock() usage in historical selector

2022-04-11 Thread Gabriel Krisman Bertazi
Khazhismel Kumykov writes: > mixing sched_clock() and ktime_get_ns() will give bad results, don't do > it > > Fixes: 2613eab11996 ("dm mpath: add Historical Service Time Path Selector") > Signed-off-by: Khazhismel Kumykov Looks good. Reviewed-by: Gabriel Krisman Bertazi > --- >

Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-11 Thread Dan Williams
On Wed, Apr 6, 2022 at 10:31 PM Christoph Hellwig wrote: > > On Wed, Apr 06, 2022 at 05:32:31PM +, Jane Chu wrote: > > Yes, I believe Dan was motivated by avoiding the dm dance as a result of > > adding .recovery_write to dax_operations. > > > > I understand your point about .recovery_write

Re: [PATCH v7 3/6] mce: fix set_mce_nospec to always unmap the whole page

2022-04-11 Thread Dan Williams
On Tue, Apr 5, 2022 at 12:48 PM Jane Chu wrote: > > The set_memory_uc() approach doesn't work well in all cases. > For example, when "The VMM unmapped the bad page from guest > physical space and passed the machine check to the guest." > "The guest gets virtual #MC on an access to that page. >

Re: [PATCH v7 2/6] x86/mce: relocate set{clear}_mce_nospec() functions

2022-04-11 Thread Dan Williams
I notice that none of the folks from "X86 MM" are on the cc, added. On Tue, Apr 5, 2022 at 12:49 PM Jane Chu wrote: > > Relocate the twin mce functions to arch/x86/mm/pat/set_memory.c > file where they belong. > > Signed-off-by: Jane Chu > --- > arch/x86/include/asm/set_memory.h | 52

Re: [PATCH v7 1/6] x86/mm: fix comment

2022-04-11 Thread Dan Williams
On Tue, Apr 5, 2022 at 12:48 PM Jane Chu wrote: > > There is no _set_memory_prot internal helper, while coming across > the code, might as well fix the comment. Looks good, Reviewed-by: Dan Williams > > Reviewed-by: Christoph Hellwig > Signed-off-by: Jane Chu > --- >

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-11 Thread Zdenek Kabelac
Dne 11. 04. 22 v 19:22 Demi Marie Obenour napsal(a): On Mon, Apr 11, 2022 at 10:16:02AM +0200, Zdenek Kabelac wrote: Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): Your proposal actually breaks this sequence and would move things to the state of  'guess at which states we are now'. (and

Re: [dm-devel] [f2fs-dev] [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-11 Thread Jaegeuk Kim
On 04/06, Christoph Hellwig wrote: > Secure erase is a very different operation from discard in that it is > a data integrity operation vs hint. Fully split the limits and helper > infrastructure to make the separation more clear. > > Signed-off-by: Christoph Hellwig > --- > block/blk-core.c

[dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone

2022-04-11 Thread Mike Snitzer
When bio_{alloc,init}_clone are passed a bdev, bio_init() will call bio_associate_blkg() so the __bio_clone() work to initialize blkcg isn't needed. Signed-off-by: Mike Snitzer --- block/bio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index

Re: [dm-devel] can we reduce bio_set_dev overhead due to bio_associate_blkg?

2022-04-11 Thread Mike Snitzer
On Mon, Apr 11 2022 at 12:58P -0400, Mike Snitzer wrote: > On Sat, Apr 09 2022 at 1:15P -0400, > Christoph Hellwig wrote: > > > On Fri, Apr 08, 2022 at 11:42:51AM -0400, Mike Snitzer wrote: > > > I think we can achieve the goal of efficient cloning/remapping for > > > both usecases simply by

Re: [dm-devel] can we reduce bio_set_dev overhead due to bio_associate_blkg?

2022-04-11 Thread Mike Snitzer
On Sat, Apr 09 2022 at 1:15P -0400, Christoph Hellwig wrote: > On Fri, Apr 08, 2022 at 11:42:51AM -0400, Mike Snitzer wrote: > > I think we can achieve the goal of efficient cloning/remapping for > > both usecases simply by splitting out the bio_set_dev() and leaving it > > to the caller to

Re: [dm-devel] [PATCH 1/3] dm: don't grab target io reference in dm_zone_map_bio

2022-04-11 Thread Ming Lei
On Mon, Apr 11, 2022 at 04:42:59PM +0900, Damien Le Moal wrote: > On 4/11/22 16:34, Ming Lei wrote: > > On Mon, Apr 11, 2022 at 11:55:14AM +0900, Damien Le Moal wrote: > >> On 4/11/22 11:19, Damien Le Moal wrote: > >>> On 4/11/22 10:04, Ming Lei wrote: > On Mon, Apr 11, 2022 at 09:50:57AM

Re: [dm-devel] [PATCH] dm: dm-zone: Fix NULL pointer dereference in dm_zone_map_bio()

2022-04-11 Thread Ming Lei
On Mon, Apr 11, 2022 at 06:38:38PM +0900, Damien Le Moal wrote: > Commit 0fbb4d93b38b ("dm: add dm_submit_bio_remap interface") changed > the alloc_io() function to delay the initialization of struct dm_io > orig_bio field, leaving this field as NULL until the first call to >

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-11 Thread Zdenek Kabelac
Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): For quite a while, I have wanted to write a tool to manage thin volumes that is not based on LVM. The main thing holding me back is that the current dm-thin interface is extremely error-prone. The only per-thin metadata stored by the kernel

Re: [dm-devel] [PATCH 1/3] dm: don't grab target io reference in dm_zone_map_bio

2022-04-11 Thread Ming Lei
On Mon, Apr 11, 2022 at 11:55:14AM +0900, Damien Le Moal wrote: > On 4/11/22 11:19, Damien Le Moal wrote: > > On 4/11/22 10:04, Ming Lei wrote: > >> On Mon, Apr 11, 2022 at 09:50:57AM +0900, Damien Le Moal wrote: > >>> On 4/11/22 09:36, Ming Lei wrote: > On Mon, Apr 11, 2022 at 09:18:56AM

Re: [dm-devel] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-11 Thread Christoph Böhmwalder
On 09.04.22 06:50, Christoph Hellwig wrote: Just use a non-zero max_discard_sectors as an indicator for discard support, similar to what is done for write zeroes. The only places where needs special attention is the RAID5 driver, which must clear discard support for security reasons by default,

Re: [dm-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:05:12AM +0200, Christoph Hellwig wrote: > Add a helper to query the number of sectors support per each discard bio > based on the block device and use this helper to stop various places from > poking into the request_queue to see if discard is supported and if so how >

Re: [dm-devel] [powerpc]Kernel crash while running xfstests (generic/250) [next-20220404]

2022-04-11 Thread Sachin Sant
> On 04-Apr-2022, at 5:04 PM, Sachin Sant wrote: > > While running xfstests(ext4 or XFS as fs) on a Power10 LPAR booted with > today’s > next (5.18.0-rc1-next-20220404) following crash is seen. > > This problem was possibly introduced with 5.17.0-next-20220330. > Git bisect leads me to

Re: [dm-devel] [PATCH 11/27] block: add a bdev_write_cache helper

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:05:00AM +0200, Christoph Hellwig wrote: > Add a helper to check the write cache flag based on the block_device > instead of having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > --- > drivers/block/rnbd/rnbd-srv.c | 2

Re: [dm-devel] [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-11 Thread Ryusuke Konishi
On Wed, Apr 6, 2022 at 11:05 PM Christoph Hellwig wrote: > > Secure erase is a very different operation from discard in that it is > a data integrity operation vs hint. Fully split the limits and helper > infrastructure to make the separation more clear. > > Signed-off-by: Christoph Hellwig >

Re: [dm-devel] [PATCH 07/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:04:56AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig As it's a standalone patch I can take it (possibly with other similar prep btrfs patches) in current development cycle to relieve the inter-tree dependencies. -- dm-devel mailing list

Re: [dm-devel] [PATCH 24/27] block: add a bdev_discard_granularity helper

2022-04-11 Thread Ryusuke Konishi
On Wed, Apr 6, 2022 at 11:06 PM Christoph Hellwig wrote: > > Abstract away implementation details from file systems by providing a > block_device based helper to retreive the discard granularity. > > Signed-off-by: Christoph Hellwig > --- > block/blk-lib.c | 5 ++--- >

[dm-devel] Potential enhancements to dm-thin v2

2022-04-11 Thread Demi Marie Obenour
For quite a while, I have wanted to write a tool to manage thin volumes that is not based on LVM. The main thing holding me back is that the current dm-thin interface is extremely error-prone. The only per-thin metadata stored by the kernel is a 24-bit thin ID, and userspace must take great care

Re: [dm-devel] [PATCH 26/27] block: uncouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:05:15AM +0200, Christoph Hellwig wrote: > Secure erase is a very different operation from discard in that it is > a data integrity operation vs hint. Fully split the limits and helper > infrastructure to make the separation more clear. > > Signed-off-by: Christoph

Re: [dm-devel] [PATCH 24/27] block: add a bdev_discard_granularity helper

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:05:13AM +0200, Christoph Hellwig wrote: > Abstract away implementation details from file systems by providing a > block_device based helper to retreive the discard granularity. > > Signed-off-by: Christoph Hellwig > --- > block/blk-lib.c | 5 ++---

Re: [dm-devel] [Cluster-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-11 Thread Andreas Gruenbacher
On Wed, Apr 6, 2022 at 8:07 AM Christoph Hellwig wrote: > > Add a helper to query the number of sectors support per each discard bio > based on the block device and use this helper to stop various places from > poking into the request_queue to see if discard is supported and if so how > much.

[dm-devel] [PATCH v2] md: dm-init: Wait devices if it's not find on first adpet

2022-04-11 Thread Fabio Aiuto
binAm5hOcSHZF.bin Description: Binary data -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH v3] md: dm-init: Wait devices if it's not find on first adpet

2022-04-11 Thread Fabio Aiuto
binZ7l3dGBTDx.bin Description: Binary data -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-11 Thread Ryusuke Konishi
On Wed, Apr 6, 2022 at 11:05 PM Christoph Hellwig wrote: > > Add a helper to query the number of sectors support per each discard bio > based on the block device and use this helper to stop various places from > poking into the request_queue to see if discard is supported and if so how > much.

Re: [dm-devel] [PATCH 10/27] block: add a bdev_nonrot helper

2022-04-11 Thread David Sterba
On Wed, Apr 06, 2022 at 08:04:59AM +0200, Christoph Hellwig wrote: > Add a helper to check the nonrot flag based on the block_device instead > of having to poke into the block layer internal request_queue. > > Signed-off-by: Christoph Hellwig > --- > block/ioctl.c | 2 +- >

Re: [dm-devel] [Drbd-dev] [PATCH 04/27] drbd: remove assign_p_sizes_qlim

2022-04-11 Thread Christoph Böhmwalder
On 09.04.22 06:50, Christoph Hellwig wrote: Fold each branch into its only caller. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 47 +++--- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c

[dm-devel] [PATCH] Fix possibility to redefine -D_FORTIFY_SOURCE macro.

2022-04-11 Thread Martin Liška
As explained here: https://github.com/opensvc/multipath-tools/issues/29 using -Wp,-D_FORTIFY_SOURCE cannot be redefined with -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3. --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index