All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Avoid that reloading a map sporadically triggers I/O errors
@ 2016-11-18 21:33 Bart Van Assche
  2016-11-18 21:43 ` Mike Snitzer
  2016-12-07 23:37 ` [PATCH] " Bart Van Assche
  0 siblings, 2 replies; 7+ messages in thread
From: Bart Van Assche @ 2016-11-18 21:33 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development

Avoid that reloading a map while there are no paths triggers a flush
and hence unwanted I/O errors if 'queue_if_no_path' is enabled.

Fixes: commit d569988e7528 ("libmultipath: Fixup 'DM_DEVICE_RELOAD' handling")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.de>
---
 libmultipath/devmapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index f92ebce..31f1962 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -390,7 +390,7 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
 			      params, ADDMAP_RO, SKIP_KPARTX_OFF);
 	}
 	if (r)
-		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, flush,
+		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush,
 				 1, udev_flags, 0);
 	return r;
 }
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Avoid that reloading a map sporadically triggers I/O errors
  2016-11-18 21:33 [PATCH] Avoid that reloading a map sporadically triggers I/O errors Bart Van Assche
@ 2016-11-18 21:43 ` Mike Snitzer
  2016-11-18 21:51   ` Bart Van Assche
  2016-12-07 23:37 ` [PATCH] " Bart Van Assche
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Snitzer @ 2016-11-18 21:43 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: device-mapper development

On Fri, Nov 18 2016 at  4:33pm -0500,
Bart Van Assche <bart.vanassche@sandisk.com> wrote:

> Avoid that reloading a map while there are no paths triggers a flush
> and hence unwanted I/O errors if 'queue_if_no_path' is enabled.

I assume you meant: "if 'queue_if_no_path' is _not_ enabled." ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Avoid that reloading a map sporadically triggers I/O errors
  2016-11-18 21:43 ` Mike Snitzer
@ 2016-11-18 21:51   ` Bart Van Assche
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2016-11-18 21:51 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: device-mapper development

On 11/18/2016 01:43 PM, Mike Snitzer wrote:
> On Fri, Nov 18 2016 at  4:33pm -0500,
> Bart Van Assche <bart.vanassche@sandisk.com> wrote:
>> Avoid that reloading a map while there are no paths triggers a flush
>> and hence unwanted I/O errors if 'queue_if_no_path' is enabled.
>
> I assume you meant: "if 'queue_if_no_path' is _not_ enabled." ?

No. Only with 'queue_if_no_path' enabled reporting an I/O error because 
no paths are available is undesired.

Bart.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Avoid that reloading a map sporadically triggers I/O errors
  2016-11-18 21:33 [PATCH] Avoid that reloading a map sporadically triggers I/O errors Bart Van Assche
  2016-11-18 21:43 ` Mike Snitzer
@ 2016-12-07 23:37 ` Bart Van Assche
  2017-01-04 19:56   ` Benjamin Marzinski
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2016-12-07 23:37 UTC (permalink / raw)
  To: Bart Van Assche, Christophe Varoqui; +Cc: device-mapper development

Christophe and Hannes, do you want to comment on this patch?

Thanks,

Bart.

On 11/18/2016 01:33 PM, Bart Van Assche wrote:
> Avoid that reloading a map while there are no paths triggers a flush
> and hence unwanted I/O errors if 'queue_if_no_path' is enabled.
>
> Fixes: commit d569988e7528 ("libmultipath: Fixup 'DM_DEVICE_RELOAD' handling")
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Hannes Reinecke <hare@suse.de>
> ---
>  libmultipath/devmapper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index f92ebce..31f1962 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/devmapper.c
> @@ -390,7 +390,7 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
>  			      params, ADDMAP_RO, SKIP_KPARTX_OFF);
>  	}
>  	if (r)
> -		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, flush,
> +		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush,
>  				 1, udev_flags, 0);
>  	return r;
>  }
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Avoid that reloading a map sporadically triggers I/O errors
  2016-12-07 23:37 ` [PATCH] " Bart Van Assche
@ 2017-01-04 19:56   ` Benjamin Marzinski
  2017-02-27 15:18     ` Bart Van Assche
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2017-01-04 19:56 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: device-mapper development

On Wed, Dec 07, 2016 at 03:37:44PM -0800, Bart Van Assche wrote:

ACK

-Ben

> Christophe and Hannes, do you want to comment on this patch?
> 
> Thanks,
> 
> Bart.
> 
> On 11/18/2016 01:33 PM, Bart Van Assche wrote:
> >Avoid that reloading a map while there are no paths triggers a flush
> >and hence unwanted I/O errors if 'queue_if_no_path' is enabled.
> >
> >Fixes: commit d569988e7528 ("libmultipath: Fixup 'DM_DEVICE_RELOAD' handling")
> >Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> >Cc: Hannes Reinecke <hare@suse.de>
> >---
> > libmultipath/devmapper.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> >index f92ebce..31f1962 100644
> >--- a/libmultipath/devmapper.c
> >+++ b/libmultipath/devmapper.c
> >@@ -390,7 +390,7 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
> > 			      params, ADDMAP_RO, SKIP_KPARTX_OFF);
> > 	}
> > 	if (r)
> >-		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, flush,
> >+		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush,
> > 				 1, udev_flags, 0);
> > 	return r;
> > }
> >
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Avoid that reloading a map sporadically triggers I/O errors
  2017-01-04 19:56   ` Benjamin Marzinski
@ 2017-02-27 15:18     ` Bart Van Assche
  2017-02-27 21:06       ` Christophe Varoqui
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2017-02-27 15:18 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development

Hello Christophe,

The patch below was posted more than three months ago but has not yet 
received any feedback from you. Had I sent this patch to the right 
person? Do you perhaps want me to repost it?

Bart.

On 01/04/17 11:56, Benjamin Marzinski wrote:
> On Wed, Dec 07, 2016 at 03:37:44PM -0800, Bart Van Assche wrote:
>
> ACK
>
> -Ben
>
>> Christophe and Hannes, do you want to comment on this patch?
>>
>> Thanks,
>>
>> Bart.
>>
>> On 11/18/2016 01:33 PM, Bart Van Assche wrote:
>>> Avoid that reloading a map while there are no paths triggers a flush
>>> and hence unwanted I/O errors if 'queue_if_no_path' is enabled.
>>>
>>> Fixes: commit d569988e7528 ("libmultipath: Fixup 'DM_DEVICE_RELOAD' handling")
>>> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>>> Cc: Hannes Reinecke <hare@suse.de>
>>> ---
>>> libmultipath/devmapper.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
>>> index f92ebce..31f1962 100644
>>> --- a/libmultipath/devmapper.c
>>> +++ b/libmultipath/devmapper.c
>>> @@ -390,7 +390,7 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
>>> 			      params, ADDMAP_RO, SKIP_KPARTX_OFF);
>>> 	}
>>> 	if (r)
>>> -		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, flush,
>>> +		r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush,
>>> 				 1, udev_flags, 0);
>>> 	return r;
>>> }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Avoid that reloading a map sporadically triggers I/O errors
  2017-02-27 15:18     ` Bart Van Assche
@ 2017-02-27 21:06       ` Christophe Varoqui
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe Varoqui @ 2017-02-27 21:06 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 1908 bytes --]

Oh yes, sorry, this patch slipped past my cursor.

This patch highlights the lack of consistency in function prototypes in
devmapper.c : some using "no_flush", others using "flush".

Anyway, your patch is now applied.
Thanks.

On Mon, Feb 27, 2017 at 4:18 PM, Bart Van Assche <bart.vanassche@sandisk.com
> wrote:

> Hello Christophe,
>
> The patch below was posted more than three months ago but has not yet
> received any feedback from you. Had I sent this patch to the right person?
> Do you perhaps want me to repost it?
>
> Bart.
>
>
> On 01/04/17 11:56, Benjamin Marzinski wrote:
>
>> On Wed, Dec 07, 2016 at 03:37:44PM -0800, Bart Van Assche wrote:
>>
>> ACK
>>
>> -Ben
>>
>> Christophe and Hannes, do you want to comment on this patch?
>>>
>>> Thanks,
>>>
>>> Bart.
>>>
>>> On 11/18/2016 01:33 PM, Bart Van Assche wrote:
>>>
>>>> Avoid that reloading a map while there are no paths triggers a flush
>>>> and hence unwanted I/O errors if 'queue_if_no_path' is enabled.
>>>>
>>>> Fixes: commit d569988e7528 ("libmultipath: Fixup 'DM_DEVICE_RELOAD'
>>>> handling")
>>>> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>>>> Cc: Hannes Reinecke <hare@suse.de>
>>>> ---
>>>> libmultipath/devmapper.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
>>>> index f92ebce..31f1962 100644
>>>> --- a/libmultipath/devmapper.c
>>>> +++ b/libmultipath/devmapper.c
>>>> @@ -390,7 +390,7 @@ int dm_addmap_reload(struct multipath *mpp, char
>>>> *params, int flush)
>>>>                               params, ADDMAP_RO, SKIP_KPARTX_OFF);
>>>>         }
>>>>         if (r)
>>>> -               r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, flush,
>>>> +               r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush,
>>>>                                  1, udev_flags, 0);
>>>>         return r;
>>>> }
>>>>
>>>
>

[-- Attachment #1.2: Type: text/html, Size: 2987 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-27 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 21:33 [PATCH] Avoid that reloading a map sporadically triggers I/O errors Bart Van Assche
2016-11-18 21:43 ` Mike Snitzer
2016-11-18 21:51   ` Bart Van Assche
2016-12-07 23:37 ` [PATCH] " Bart Van Assche
2017-01-04 19:56   ` Benjamin Marzinski
2017-02-27 15:18     ` Bart Van Assche
2017-02-27 21:06       ` Christophe Varoqui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.