Re: [dm-devel] [PATCH v3 1/3] libmultipath: prevent memory leak in alloc_path_with_pathinfo() if pp_ptr is NULL

2016-12-13 Thread Hannes Reinecke
On 12/14/2016 03:01 AM, Mauricio Faria de Oliveira wrote: In alloc_path_with_pathinfo(), if the 'pp_ptr' argument is NULL (which is acceptable and checked in the function in two places) the 'pp' pointer is lost as it is not referenced anywhere else; thus the memory allocated for it is leaked. So

Re: [dm-devel] [PATCH v3 3/3] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Hannes Reinecke
On 12/14/2016 03:02 AM, Mauricio Faria de Oliveira wrote: Currently, multipath still prints the 'spurious uevent, path not found' message if a path is blacklisted by something different than a devnode in the 'change' uevent handling. (uev_trigger() calls filter_devnode()). Thus blacklisting by v

Re: [dm-devel] [PATCH v3 2/3] libmultipath: move filter_property() from path_discover() into pathinfo()

2016-12-13 Thread Hannes Reinecke
On 12/14/2016 03:02 AM, Mauricio Faria de Oliveira wrote: The udev property blacklisting is ignored on 'add' uevents because uev_add_path() calls pathinfo() directly - but the filter_property() check is only performed in path_discover(). So, move the call out from path_discover() into pathinfo()

[dm-devel] libmultipath: how to handle sg_read return PATH_DOWN with some lpfc drivers?

2016-12-13 Thread Xieyingtai
Hi, Recently I met a problem with descrptions below: When /etc/multipath.conf was configured "path_checker" with readsector0 and passed in BUFFER_SIZE 4096 to sg_read() as below: int libcheck_check (struct checker * c) { unsigned char buf[4096];

[dm-devel] [PATCH v3 3/3] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Mauricio Faria de Oliveira
Currently, multipath still prints the 'spurious uevent, path not found' message if a path is blacklisted by something different than a devnode in the 'change' uevent handling. (uev_trigger() calls filter_devnode()). Thus blacklisting by vendor/product, wwid, and udev property still get that messag

[dm-devel] [PATCH v3 1/3] libmultipath: prevent memory leak in alloc_path_with_pathinfo() if pp_ptr is NULL

2016-12-13 Thread Mauricio Faria de Oliveira
In alloc_path_with_pathinfo(), if the 'pp_ptr' argument is NULL (which is acceptable and checked in the function in two places) the 'pp' pointer is lost as it is not referenced anywhere else; thus the memory allocated for it is leaked. So, call free_path() in the case 'pp_ptr' is NULL too. Signed

[dm-devel] [PATCH v3 2/3] libmultipath: move filter_property() from path_discover() into pathinfo()

2016-12-13 Thread Mauricio Faria de Oliveira
The udev property blacklisting is ignored on 'add' uevents because uev_add_path() calls pathinfo() directly - but the filter_property() check is only performed in path_discover(). So, move the call out from path_discover() into pathinfo(). Since path_discover() always calls pathinfo() to return,

Re: [dm-devel] [PATCH v2 2/2] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Mauricio Faria de Oliveira
Ben, On 12/13/2016 07:50 PM, Benjamin Marzinski wrote: [snip] I don't see why the udev_device_ref/unref is necessary. While servicing uevents, when we first get the udevice from udev_monitor_receive_device() in uevent_listen() it comes with a reference. After we finish servicing the uevent, we d

Re: [dm-devel] [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-13 Thread Joe Perches
On Tue, 2016-12-13 at 11:14 +0100, Michal Hocko wrote: > Are there any more comments or objections to this patch? Is this a good > start or kv[mz]alloc has to provide a way to cover GFP_NOFS users as > well in the initial version. Did Andrew Morton ever comment on this? I believe he was the primar

Re: [dm-devel] [PATCH] dm: Avoid sleeping while holding the dm_bufio lock

2016-12-13 Thread Doug Anderson
Hi, On Mon, Dec 12, 2016 at 4:08 PM, Doug Anderson wrote: > OK, so I just put a printk in wait_iff_congested() and it didn't show > me waiting for the timeout (!). I know that I saw > wait_iff_congested() in the originally reproduction of this problem, > but it appears that in my little "balloon

Re: [dm-devel] [PATCH v2 2/2] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Benjamin Marzinski
On Tue, Dec 13, 2016 at 04:27:09PM -0200, Mauricio Faria de Oliveira wrote: Thanks for working on this. I like this version much better, but I still have some issues. First off, I don't see why the udev_device_ref/unref is necessary. While servicing uevents, when we first get the udevice from udev

Re: [dm-devel] [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-13 Thread Andreas Dilger
On Dec 13, 2016, at 3:14 AM, Michal Hocko wrote: > > Are there any more comments or objections to this patch? Is this a good > start or kv[mz]alloc has to provide a way to cover GFP_NOFS users as > well in the initial version. I'm in favour of this cleanup as a starting point. I definitely agre

[dm-devel] [PATCH] dm raid: change raid4/5/6 journal device status health char to 'A' rather than 'J'

2016-12-13 Thread Heinz Mauelshagen
There's no need to create a tautology by introducing a new device health char 'J', because the position of the status line field uniquely defines the char refering to the journal. This patch is on top of "[PATCH v2] dm raid: add raid4/5/6 journaling support" dated 11/30/2016. Related: rhbz140019

[dm-devel] [PATCH v2 1/2] libmultipath: prevent memory leak in alloc_path_with_pathinfo() if pp_ptr is NULL

2016-12-13 Thread Mauricio Faria de Oliveira
In alloc_path_with_pathinfo(), if the 'pp_ptr' argument is NULL (which is acceptable and checked in the function in two places) the 'pp' pointer is lost as it is not referenced anywhere else; thus the memory allocated for it is leaked. So, call free_path() in the case 'pp_ptr' is NULL too. Signed

[dm-devel] [PATCH v2 2/2] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Mauricio Faria de Oliveira
Currently, multipath still prints the 'spurious uevent, path not found' message if a path is blacklisted by something different than a devnode in the 'change' uevent handling. (uev_trigger() calls filter_devnode()). Thus blacklisting by vendor/product, wwid, and udev property still get that messag

Re: [dm-devel] [PATCH 2/2] multipathd: skip spurious event message for blacklisted paths

2016-12-13 Thread Mauricio Faria de Oliveira
Ben, On 12/12/2016 01:20 PM, Mauricio Faria de Oliveira wrote: On 12/12/2016 12:23 PM, Benjamin Marzinski wrote: Why don't we just call pathinfo here? I see that you set the pathvec to NULL so that you don't actually store the path, but this sure does a lot of unnecessary work before failing. A

Re: [dm-devel] [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-13 Thread Michal Hocko
Are there any more comments or objections to this patch? Is this a good start or kv[mz]alloc has to provide a way to cover GFP_NOFS users as well in the initial version. On Thu 08-12-16 11:33:00, Michal Hocko wrote: > From: Michal Hocko > > Using kmalloc with the vmalloc fallback for larger allo

Re: [dm-devel] [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-13 Thread Milan Broz
On 12/13/2016 09:49 AM, Binoy Jayan wrote: > Currently, the iv generation algorithms are implemented in dm-crypt.c. > The goal is to move these algorithms from the dm layer to the kernel > crypto layer by implementing them as template ciphers so they can be > implemented in hardware for performance

[dm-devel] [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-13 Thread Binoy Jayan
Currently, the iv generation algorithms are implemented in dm-crypt.c. The goal is to move these algorithms from the dm layer to the kernel crypto layer by implementing them as template ciphers so they can be implemented in hardware for performance. As part of this patchset, the iv-generation code

[dm-devel] [RFC PATCH v2] IV Generation algorithms for dm-crypt

2016-12-13 Thread Binoy Jayan
=== GENIV Template cipher === Currently, the iv generation algorithms are implemented in dm-crypt.c. The goal is to move these algorithms from the