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 +090

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 is

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 > __split_and_process_bi

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 +090

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 pick

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 s

[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 7892f1108ca6..698

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

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 IM

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 > --- > arch/x86/mm/pat/set_mem

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 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. > Wh

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 is

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 > --- > drivers/md/

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 f

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: [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 b/drivers/md/d

[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

[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 wil

[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(+), 11

[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 --- libmultipath/props

[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, 21

[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 sele

[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 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 -- libmulti

[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 +++ b/multipath/mul

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 >

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 f

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 encounteri

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 the