All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch]: [multipath-tool] Add check for removed device in rdac checker
@ 2008-10-27 15:11 Yanqing_Liu
  2008-10-27 17:01 ` Konrad Rzeszutek
  0 siblings, 1 reply; 4+ messages in thread
From: Yanqing_Liu @ 2008-10-27 15:11 UTC (permalink / raw)
  To: christophe.varoqui; +Cc: dm-devel

Hi,

This patch adds a check for removed device in rdac checker. After volume
access inquiry returns, the checker will check the peripheral qualifier
field to see if the device is deleted/unmapped. If so, mark path as
failed.

Signed off by: Yanqing Liu <Yanqing_Liu@Dell.com>

---

--- libcheckers/rdac.c.orig	2008-10-22 02:52:33.000000000 -0400
+++ libcheckers/rdac.c	2008-10-17 03:43:13.000000000 -0400
@@ -27,6 +27,7 @@
 #define MSG_RDAC_UP    "rdac checker reports path is up"
 #define MSG_RDAC_DOWN  "rdac checker reports path is down"
 #define MSG_RDAC_GHOST "rdac checker reports path is ghost"
+#define MSG_RDAC_DELETED "rdac checker reports path deleted"
 
 struct rdac_checker_context {
 	void * dummy;
@@ -90,7 +91,8 @@
 
 struct volume_access_inq
 {
-	char dontcare0[8];
+	char qualifier;
+	char dontcare0[7];
 	char avtcvp;
 	char dontcare1[39];
 };
@@ -104,6 +106,12 @@
 		MSG(c, MSG_RDAC_DOWN);
 		return PATH_DOWN;
 	}
+	
+	if (0 != inq.qualifier) {
+		MSG(c, MSG_RDAC_DELETED);
+		return PATH_DOWN;
+	}
+		
 
 	return ((inq.avtcvp & 0x1) ? PATH_UP : PATH_GHOST);  }

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

* Re: [patch]: [multipath-tool] Add check for removed device in rdac checker
  2008-10-27 15:11 [patch]: [multipath-tool] Add check for removed device in rdac checker Yanqing_Liu
@ 2008-10-27 17:01 ` Konrad Rzeszutek
  2008-10-28  9:41   ` [patch]: [multipath-tool] Add check for removeddevice " Shyam_Iyer
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek @ 2008-10-27 17:01 UTC (permalink / raw)
  To: device-mapper development

On Mon, Oct 27, 2008 at 10:11:28AM -0500, Yanqing_Liu@Dell.com wrote:
> Hi,
> 
> This patch adds a check for removed device in rdac checker. After volume
> access inquiry returns, the checker will check the peripheral qualifier
> field to see if the device is deleted/unmapped. If so, mark path as
> failed.

How does multipathd behaves when this fix is not in? Does
it still mark the path down? I would presume so, but it would take
longer (the default SCSI timeout value?)

> 
> Signed off by: Yanqing Liu <Yanqing_Liu@Dell.com>
> 
> ---
> 
> --- libcheckers/rdac.c.orig	2008-10-22 02:52:33.000000000 -0400
> +++ libcheckers/rdac.c	2008-10-17 03:43:13.000000000 -0400
> @@ -27,6 +27,7 @@
>  #define MSG_RDAC_UP    "rdac checker reports path is up"
>  #define MSG_RDAC_DOWN  "rdac checker reports path is down"
>  #define MSG_RDAC_GHOST "rdac checker reports path is ghost"
> +#define MSG_RDAC_DELETED "rdac checker reports path deleted"
>  
>  struct rdac_checker_context {
>  	void * dummy;
> @@ -90,7 +91,8 @@
>  
>  struct volume_access_inq
>  {
> -	char dontcare0[8];
> +	char qualifier;
> +	char dontcare0[7];
>  	char avtcvp;
>  	char dontcare1[39];
>  };
> @@ -104,6 +106,12 @@
>  		MSG(c, MSG_RDAC_DOWN);
>  		return PATH_DOWN;
>  	}
> +	
> +	if (0 != inq.qualifier) {
> +		MSG(c, MSG_RDAC_DELETED);
> +		return PATH_DOWN;
> +	}
> +		
>  
>  	return ((inq.avtcvp & 0x1) ? PATH_UP : PATH_GHOST);  }
> 
> 
> 
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

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

* RE: [patch]: [multipath-tool] Add check for removeddevice in rdac checker
  2008-10-27 17:01 ` Konrad Rzeszutek
@ 2008-10-28  9:41   ` Shyam_Iyer
  2008-10-28 14:10     ` Konrad Rzeszutek
  0 siblings, 1 reply; 4+ messages in thread
From: Shyam_Iyer @ 2008-10-28  9:41 UTC (permalink / raw)
  To: dm-devel


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

Konrad Wrote:
> On Mon, Oct 27, 2008 at 10:11:28AM -0500, Yanqing_Liu@Dell.com wrote:
> > Hi,
> >
> > This patch adds a check for removed device in rdac checker. After
> > volume access inquiry returns, the checker will check the peripheral
> > qualifier field to see if the device is deleted/unmapped. If so,
mark
> > path as failed.

> How does multipathd behaves when this fix is not in? Does it still
mark the path down? I would presume so, but it would take longer (the
default SCSI timeout value?)

Absolutely. But that would also be after some IOs on the failed path and
the device being marked offline. Instead if the controller device is
intelligent to support a feature to know if the path is down through an
inquiry then it is worth marking the path down earlier. 

Thanks for reviewing.

-Shyam Iyer.


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

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



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

* Re: [patch]: [multipath-tool] Add check for removeddevice in rdac checker
  2008-10-28  9:41   ` [patch]: [multipath-tool] Add check for removeddevice " Shyam_Iyer
@ 2008-10-28 14:10     ` Konrad Rzeszutek
  0 siblings, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek @ 2008-10-28 14:10 UTC (permalink / raw)
  To: device-mapper development

On Tue, Oct 28, 2008 at 03:11:08PM +0530, Shyam_Iyer@Dell.com wrote:
> Konrad Wrote:
> > On Mon, Oct 27, 2008 at 10:11:28AM -0500, Yanqing_Liu@Dell.com wrote:
> > > Hi,
> > >
> > > This patch adds a check for removed device in rdac checker. After
> > > volume access inquiry returns, the checker will check the peripheral
> > > qualifier field to see if the device is deleted/unmapped. If so,
> mark
> > > path as failed.
> 
> > How does multipathd behaves when this fix is not in? Does it still
> mark the path down? I would presume so, but it would take longer (the
> default SCSI timeout value?)
> 
> Absolutely. But that would also be after some IOs on the failed path and
> the device being marked offline. Instead if the controller device is
> intelligent to support a feature to know if the path is down through an
> inquiry then it is worth marking the path down earlier. 

I concur.
> 
> Thanks for reviewing.

You are welcome.

+1

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

end of thread, other threads:[~2008-10-28 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 15:11 [patch]: [multipath-tool] Add check for removed device in rdac checker Yanqing_Liu
2008-10-27 17:01 ` Konrad Rzeszutek
2008-10-28  9:41   ` [patch]: [multipath-tool] Add check for removeddevice " Shyam_Iyer
2008-10-28 14:10     ` Konrad Rzeszutek

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.