Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Mike Snitzer
On Tue, Apr 12 2022 at 9:56P -0400, Ming Lei wrote: > On Tue, Apr 12, 2022 at 04:52:40PM -0400, Mike Snitzer wrote: > > On Tue, Apr 12 2022 at 4:56P -0400, > > Ming Lei wrote: > > > > > The current DM codes setup ->orig_bio after __map_bio() returns, > > > and not only cause kernel panic for

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

2022-04-13 Thread Zdenek Kabelac
Dne 12. 04. 22 v 16:29 David Teigland napsal(a): 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. On Tue, Apr 12, 2022 at 11:32:09AM +0200, Zdenek Kabelac wrote: Here is actually the

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Ming Lei
On Wed, Apr 13, 2022 at 02:12:47AM -0400, Mike Snitzer wrote: > On Tue, Apr 12 2022 at 9:56P -0400, > Ming Lei wrote: > > > On Tue, Apr 12, 2022 at 04:52:40PM -0400, Mike Snitzer wrote: > > > On Tue, Apr 12 2022 at 4:56P -0400, > > > Ming Lei wrote: > > > > > > > The current DM codes setup

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Mike Snitzer
On Wed, Apr 13 2022 at 8:26P -0400, Ming Lei wrote: > On Wed, Apr 13, 2022 at 02:12:47AM -0400, Mike Snitzer wrote: > > On Tue, Apr 12 2022 at 9:56P -0400, > > Ming Lei wrote: > > > > > On Tue, Apr 12, 2022 at 04:52:40PM -0400, Mike Snitzer wrote: > > > > On Tue, Apr 12 2022 at 4:56P -0400,

Re: [dm-devel] [PATCH 4/5] block: turn bio_kmalloc into a simple kmalloc wrapper

2022-04-13 Thread Mike Snitzer
On Wed, Apr 06 2022 at 2:12P -0400, Christoph Hellwig wrote: > Remove the magic autofree semantics and require the callers to explicitly > call bio_init to initialize the bio. > > This allows bio_free to catch accidental bio_put calls on bio_init()ed > bios as well. > > Signed-off-by:

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

2022-04-13 Thread Jane Chu
On 4/11/2022 5:08 PM, Dan Williams wrote: > 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

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

2022-04-13 Thread Jane Chu
On 4/11/2022 10:02 PM, Christoph Hellwig wrote: > 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() >> *

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

2022-04-13 Thread Jane Chu
On 4/12/2022 3:07 AM, Borislav Petkov wrote: > On Tue, Apr 05, 2022 at 01:47:44PM -0600, 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." >>

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

2022-04-13 Thread Jane Chu
On 4/11/2022 3:20 PM, Dan Williams wrote: > I notice that none of the folks from "X86 MM" are on the cc, added. > Noted, thanks! > 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. >> >>

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Mike Snitzer
On Wed, Apr 13 2022 at 8:36P -0400, Ming Lei wrote: > On Wed, Apr 13, 2022 at 01:58:54PM -0400, Mike Snitzer wrote: > > > > The bigger issue with this patch is that you've caused > > dm_submit_bio_remap() to go back to accounting the entire original bio > > before any split occurs. That is a

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Ming Lei
On Wed, Apr 13, 2022 at 01:58:54PM -0400, Mike Snitzer wrote: > On Wed, Apr 13 2022 at 8:26P -0400, > Ming Lei wrote: > > > On Wed, Apr 13, 2022 at 02:12:47AM -0400, Mike Snitzer wrote: > > > On Tue, Apr 12 2022 at 9:56P -0400, > > > Ming Lei wrote: > > > > > > > On Tue, Apr 12, 2022 at

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

2022-04-13 Thread Jane Chu
On 4/11/2022 9:26 PM, Dan Williams wrote: > 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

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

2022-04-13 Thread Dan Williams
On Wed, Apr 13, 2022 at 4:36 PM Jane Chu wrote: > > On 4/11/2022 4:27 PM, Dan Williams wrote: > > 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

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-13 Thread Ming Lei
On Wed, Apr 13, 2022 at 10:25:45PM -0400, Mike Snitzer wrote: > On Wed, Apr 13 2022 at 8:36P -0400, > Ming Lei wrote: > > > On Wed, Apr 13, 2022 at 01:58:54PM -0400, Mike Snitzer wrote: > > > > > > The bigger issue with this patch is that you've caused > > > dm_submit_bio_remap() to go back to

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

2022-04-13 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 Reviewed-by: Martin Wilck --- libmultipath/config.c | 16 +--- 1 file

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

2022-04-13 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 v2 2/7] libmultipath: make protocol_name global

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

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

2022-04-13 Thread Jane Chu
On 4/12/2022 2:53 AM, Borislav Petkov wrote: > On Tue, Apr 05, 2022 at 01:47:42PM -0600, Jane Chu wrote: >> There is no _set_memory_prot internal helper, while coming across >> the code, might as well fix the comment. >> >> Reviewed-by: Christoph Hellwig >> Signed-off-by: Jane Chu >> --- >>

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

2022-04-13 Thread Dan Williams
On Wed, Apr 13, 2022 at 5:55 PM Jane Chu wrote: > > On 4/11/2022 9:26 PM, Dan Williams wrote: > > 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

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

2022-04-13 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 v2 5/7] libmultipath: check the overrides pctable for path variables

2022-04-13 Thread Benjamin Marzinski
Paths will now also check the pctable when checking for attribtes that exists in both the overrides section and the protocol subsection. Values in a matching pcentry will be used in preference to values in the overrides hwentry. Signed-off-by: Benjamin Marzinski --- libmultipath/propsel.c | 29

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

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

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

2022-04-13 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 overrides section in multipath.conf, which allows

[dm-devel] [PATCH v2 6/7] libmultipath: fix eh_deadline documentation

2022-04-13 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 @@

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

2022-04-13 Thread Jane Chu
On 4/11/2022 4:27 PM, Dan Williams wrote: > 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

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

2022-04-13 Thread Jane Chu
On 4/11/2022 4:55 PM, Dan Williams wrote: > 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