Re: [dm-devel] [PATCH v2 0/4] misc multipath patches

2019-09-13 Thread Martin Wilck
On Fri, 2019-09-13 at 17:04 -0500, Benjamin Marzinski wrote: > These are a couple of disconnected multipath patches. > > Changes in v2: > > 0003: As Martin suggested, fail immediately on wrong number of prin > actions. > > 0004: mp_init now is an optional symbol for checker DSOs, and is >

[dm-devel] [PATCH v2 3/4] mpathpersist: fix leaks

2019-09-13 Thread Benjamin Marzinski
If handle_args() fails while looping through the argument list, it needs to free batch_fn, if it has been set. Also handle_args() needs to make sure to free the file descriptor after it has been opened. Signed-off-by: Benjamin Marzinski --- mpathpersist/main.c | 33

[dm-devel] [PATCH v2 1/4] mpathpersist: remove broken/unused code

2019-09-13 Thread Benjamin Marzinski
The test for an empty pp->dev in updatepaths() dates back to when disassemble_map() didn't fill in pp->dev for newly added paths, and it was meant to catch paths that got added by disassemble_map(). With the mpathpersist speedup code, all paths get added by disassemble_map(). However,

[dm-devel] [PATCH v2 4/4] libmultipath: fix mpcontext initialization

2019-09-13 Thread Benjamin Marzinski
If a path is discovered before there is a multipath device for it to belong to, the checker will not have its mpcontext initialized, even if that path later belongs to a multipath device. A checker's mpcontext is only set when the checker is selected, and is set to NULL if there is no multipath

[dm-devel] [PATCH v2 0/4] misc multipath patches

2019-09-13 Thread Benjamin Marzinski
These are a couple of disconnected multipath patches. Changes in v2: 0003: As Martin suggested, fail immediately on wrong number of prin actions. 0004: mp_init now is an optional symbol for checker DSOs, and is ignored if it's missing, again at Martin's suggestion. Benjamin

Re: [dm-devel] [PATCH v2 5/5] dm-bufio: introduce a global cache replacement

2019-09-13 Thread Mikulas Patocka
On Fri, 13 Sep 2019, Mike Snitzer wrote: > On Thu, Sep 12 2019 at 12:07P -0400, > Mikulas Patocka wrote: > > > > > > > On Thu, 12 Sep 2019, Heinz Mauelshagen wrote: > > > > > Mikulas, > > > > > > please use list_move instead of list_del/list_add pairs. > > > > > > Heinz > > > > OK.

Re: [dm-devel] [PATCH 3/4] mpathpersist: fix leaks

2019-09-13 Thread Benjamin Marzinski
On Fri, Sep 13, 2019 at 07:56:13AM +, Martin Wilck wrote: > On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > > If handle_args() fails while looping through the argument list, it > > needs > > to free batch_fn, if it has been set. Also handle_args() needs to > > make > > sure to

Re: [dm-devel] [PATCH 4/4] libmultipath: fix mpcontext initialization

2019-09-13 Thread Benjamin Marzinski
On Fri, Sep 13, 2019 at 08:28:59AM +, Martin Wilck wrote: > On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > > If a path is discovered before there is a multipath device for it to > > belong to, the checker will not have its mpcontext initialized, even > > if > > that path later

Re: [dm-devel] [PATCH v2 5/5] dm-bufio: introduce a global cache replacement

2019-09-13 Thread Mike Snitzer
On Thu, Sep 12 2019 at 12:07P -0400, Mikulas Patocka wrote: > > > On Thu, 12 Sep 2019, Heinz Mauelshagen wrote: > > > Mikulas, > > > > please use list_move instead of list_del/list_add pairs. > > > > Heinz > > OK. Here I resend it. > > > > From: Mikulas Patocka > > This patch

Re: [PATCH v2] lib/memweight.c: open codes bitmap_weight()

2019-09-13 Thread efremov
Sorry, no question, pointer alignment of course. Denis Efremov писал 2019-09-13 14:48: Hi, Sorry for reviving this conversation, but it looks to me like this function could be reduced to a single bitmap_weight call: static inline size_t memweight(const void *ptr, size_t bytes) {

Re: [PATCH v2] lib/memweight.c: open codes bitmap_weight()

2019-09-13 Thread Denis Efremov
Hi, Sorry for reviving this conversation, but it looks to me like this function could be reduced to a single bitmap_weight call: static inline size_t memweight(const void *ptr, size_t bytes) { BUG_ON(bytes >= UINT_MAX / BITS_PER_BYTE); return bitmap_weight(ptr, bytes *

Re: [dm-devel] [PATCH 4/4] libmultipath: fix mpcontext initialization

2019-09-13 Thread Martin Wilck
On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > If a path is discovered before there is a multipath device for it to > belong to, the checker will not have its mpcontext initialized, even > if > that path later belongs to a multipath device. A checker's mpcontext > is > only set

Re: [dm-devel] [PATCH 3/4] mpathpersist: fix leaks

2019-09-13 Thread Martin Wilck
On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > If handle_args() fails while looping through the argument list, it > needs > to free batch_fn, if it has been set. Also handle_args() needs to > make > sure to free the file descriptor after it has been opened. > > Signed-off-by:

Re: [dm-devel] [PATCH 2/4] libmultipath: EMC PowerMax NVMe device config

2019-09-13 Thread Martin Wilck
On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > Got this config from Dell. > > Cc: heyi > Signed-off-by: Benjamin Marzinski > --- > libmultipath/hwtable.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] [PATCH 1/4] mpathpersist: remove broken/unused code

2019-09-13 Thread Martin Wilck
On Tue, 2019-09-10 at 17:39 -0500, Benjamin Marzinski wrote: > The test for an empty pp->dev in updatepaths() dates back to when > disassemble_map() didn't fill in pp->dev for newly added paths, and > it > was meant to catch paths that got added by disassemble_map(). With > the > mpathpersist