Re: [dm-devel] [PATCH 2/2] multipath: fix rcu thread cancellation hang

2018-03-23 Thread Martin Wilck
On Fr, 2018-03-23 at 15:00 -0500, Benjamin Marzinski wrote: > While the rcu code is waiting for a grace period to elapse, no > threads > can register or unregister as rcu reader threads. If for some reason, > a > thread never calls put_multipath_config() to exit a read side > critical > section,

Re: [dm-devel] [PATCH 1/2] multipathd: register threads that use rcu calls

2018-03-23 Thread Martin Wilck
On Fr, 2018-03-23 at 15:00 -0500, Benjamin Marzinski wrote: > All calls to condlog() are rcu reader side calls, so any thread that > uses condlog() must register itself. The only threads that are exempt > are log_thread, since it never calls condlog (or any other function > that > calls

[dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-23 Thread Martin Wilck
On Fr, 2018-03-23 at 19:28 +0100, Xose Vazquez Perez wrote: > > https://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob_plai > n;f=COPYING;hb=HEAD > > GNU *LIBRARY* GENERAL PUBLIC LICENSE > Version 2, June 1991 > > aka "Lesser", but rules are

Re: [dm-devel] [PATCH v2 08/20] libmultipath: use const char* in open_file()

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:43PM +0100, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/file.c | 6 +++--- > libmultipath/file.h | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff

Re: [dm-devel] [PATCH v2 07/20] libmultipath: change find_multipaths option to multi-value

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:42PM +0100, Martin Wilck wrote: > Change the "find_multipaths" option from yes/no to multi-value. This > option now covers the effects of "find_multipaths" as it used to be, > plus the -i option to multipath (ignore_wwids) and the -n option to > multipathd

[dm-devel] [PATCH 2/2] multipath: fix rcu thread cancellation hang

2018-03-23 Thread Benjamin Marzinski
While the rcu code is waiting for a grace period to elapse, no threads can register or unregister as rcu reader threads. If for some reason, a thread never calls put_multipath_config() to exit a read side critical section, then any threads trying to start or stop will hang. This can happen if a

[dm-devel] [PATCH 0/2] Fix RCU hang

2018-03-23 Thread Benjamin Marzinski
I have run into a RCU related hang with multipathd, when I reconfigured and then shutdown multipathd in quick succession. I haven't been able to recreate it without manually adding a sleep() call to the code, but I have figured out what could have caused it. While the rcu code is waiting for a

[dm-devel] [PATCH 1/2] multipathd: register threads that use rcu calls

2018-03-23 Thread Benjamin Marzinski
All calls to condlog() are rcu reader side calls, so any thread that uses condlog() must register itself. The only threads that are exempt are log_thread, since it never calls condlog (or any other function that calls get_multipath_config) and mpath_pr_event_handler_fn, which is only called by

Re: [dm-devel] [PATCH] multipath-tools: replace FSF address with a www pointer

2018-03-23 Thread Xose Vazquez Perez
On 03/19/2018 10:37 PM, Martin Wilck wrote: > On Sat, 2018-03-10 at 21:50 +0100, Xose Vazquez Perez wrote: >> Less prone to future modifications, and new FSF licences >> point exactly to this url: . >> >> First clean up was done in

Re: [dm-devel] [PATCH v2 06/20] libmultipath: trigger path uevent only when necessary

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:41PM +0100, Martin Wilck wrote: > Paths that are already classified as DM_MULTIPATH_DEVICE_PATH don't > need to be retriggered. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/configure.c |

Re: [dm-devel] [PATCH v2 04/20] multipath -u -i: respect entries in WWIDs file

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:39PM +0100, Martin Wilck wrote: > Previously, if find_multipaths was set, devices listed in the WWIDs file > weren't classified as multipath members by "multipath -u -i" unless they also > met the "find_multipaths" criteria (at least two paths, or existing map with >

Re: [dm-devel] [PATCH v2 01/20] Revert "multipath: ignore -i if find_multipaths is set"

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:36PM +0100, Martin Wilck wrote: > This reverts commit ffbb886a8a16cb063d669cd76a1e656fd3ec8c4b. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipath/main.c | 10 -- > 1 file changed, 10

Re: [dm-devel] [PATCH v2 03/20] libmultipath: should_multipath: keep existing maps

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:38PM +0100, Martin Wilck wrote: > with find_multipaths "yes" and without the "-n" option to multipathd, > if a path is already multipathed, keep it. The same logic is applied by > "multipath -u -i". > > To do this, we need to add a "mpvec" parameter to

Re: [dm-devel] [PATCH v2 02/20] Revert "multipathd: imply -n if find_multipaths is set"

2018-03-23 Thread Benjamin Marzinski
On Mon, Mar 19, 2018 at 04:01:37PM +0100, Martin Wilck wrote: > This reverts commit 64e27ec066a001012f44550f095c93443e91d845. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 4 > 1 file changed, 4

Re: [dm-devel] [PATCH v2 3/5] libmultipath: config parser: Allow '"' in strings

2018-03-23 Thread Martin Wilck
On Fr, 2018-03-23 at 17:59 +0100, Xose Vazquez Perez wrote: > On 03/08/2018 12:26 AM, Martin Wilck wrote: > > > We have seen model strings lile '2.5" SSD' which can't be parsed > > by the current config parser. This patch fixes this by allowing > > '""' to represent a double quote character

Re: [dm-devel] [PATCH v2 3/5] libmultipath: config parser: Allow '"' in strings

2018-03-23 Thread Xose Vazquez Perez
On 03/08/2018 12:26 AM, Martin Wilck wrote: > We have seen model strings lile '2.5" SSD' which can't be parsed > by the current config parser. This patch fixes this by allowing > '""' to represent a double quote character inside a a string. > The above model string could now be entered in the

Re: [dm-devel] [PATCH] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-03-23 Thread Christopher Lameter
On Fri, 23 Mar 2018, Mikulas Patocka wrote: > This test isn't locked against anything, so it may race with concurrent > allocation. "any_slab_objects" may return false and a new object in the > slab cache may appear immediatelly after that. Ok the same reasoning applies to numerous other slab

Re: [dm-devel] dm table: add support for secure erase forwarding [was: Re: Adaptation secure erase forwarding for 4.1x kernels]

2018-03-23 Thread Mike Snitzer
On Fri, Mar 23 2018 at 10:47am -0400, Denis Semakin wrote: > >I'd feel safer about having targets opt-in with setting (a new) > >ti->num_secure_erase_bios. > May be add a new field "bool secure_erase_supported:1" in dm_target structure > instead? > And set up it "true"

Re: [dm-devel] dm table: add support for secure erase forwarding [was: Re: Adaptation secure erase forwarding for 4.1x kernels]

2018-03-23 Thread Mike Snitzer
On Fri, Mar 23 2018 at 4:14am -0400, Denis Semakin wrote: > Hi. > Soon or later everybody start to think about security. > One of the most frequently requirement is 100% reliable data deletion from > any device in case of compromising or loss or theft. > > For this,

Re: [dm-devel] [PATCH] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-03-23 Thread Mikulas Patocka
On Fri, 23 Mar 2018, Christopher Lameter wrote: > On Wed, 21 Mar 2018, Mikulas Patocka wrote: > > > > + s->allocflags = allocflags; > > > > I'd also use "WRITE_ONCE(s->allocflags, allocflags)" here and when writing > > s->oo and s->min to avoid some possible compiler misoptimizations. > > It

[dm-devel] [multipath] Should we include python API in the codebase?

2018-03-23 Thread Gris Ge
Hi Guys, I created a python API of multipath using the JSON output of multipathd like what we did C API -- libdmmp: https://github.com/cathay4t/python-dmmp Does upstream want it maintained in the codebase of multipath-tools? Thanks. -- Gris Ge signature.asc Description: PGP signature

Re: [dm-devel] [PATCH] slab: introduce the flag SLAB_MINIMIZE_WASTE

2018-03-23 Thread Christopher Lameter
On Wed, 21 Mar 2018, Mikulas Patocka wrote: > > + s->allocflags = allocflags; > > I'd also use "WRITE_ONCE(s->allocflags, allocflags)" here and when writing > s->oo and s->min to avoid some possible compiler misoptimizations. It only matters that 0 etc is never written. > Another problem is

Re: [dm-devel] [PATCH v2 1/2] libmultipath: don't reject maps with undefined prio

2018-03-23 Thread Martin Wilck
On Fr, 2018-03-23 at 11:30 +0100, Martin Wilck wrote: > On Do, 2018-03-22 at 18:52 -0500, Benjamin Marzinski wrote: > > On Wed, Mar 21, 2018 at 10:34:18AM +0100, Martin Wilck wrote: > > > libmultipath's prio routines can deal with pp->priority == > > > PRIO_UNDEF > > > just fine. PRIO_UNDEF is

Re: [dm-devel] [PATCH v2 1/2] libmultipath: don't reject maps with undefined prio

2018-03-23 Thread Martin Wilck
On Do, 2018-03-22 at 18:52 -0500, Benjamin Marzinski wrote: > On Wed, Mar 21, 2018 at 10:34:18AM +0100, Martin Wilck wrote: > > libmultipath's prio routines can deal with pp->priority == > > PRIO_UNDEF > > just fine. PRIO_UNDEF is just a very low priority. So there's > > no reason to reject

[dm-devel] [PATCH v2] Add an option to dm-verity to validate hashes at most once

2018-03-23 Thread Patrik Torstensson
Add an option to dm-verity to validate hashes at most once to allow platforms that is CPU/memory contraint to be protected by dm-verity against offline attacks. The option introduces a bitset that is used to check if a block has been validated before or not. A block can be validated more than