Message ID | 511CF1F8.4040100@acm.org (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Patch looks ok to me. When I added transport-offline to scsi-ml, I forgot to modify userspace apps. Thanks for fixing. For the second part, I think it makes sense to handle quiesce like blocked since drivers use that state like how fc/iscsi use blocked. Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> On 02/14/2013 08:17 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche <bvanassche@acm.org> > --- > libmultipath/discovery.c | 5 +++-- > libmultipath/structs.h | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c > index 3fbc181..0b5fd1d 100644 > --- a/libmultipath/discovery.c > +++ b/libmultipath/discovery.c > @@ -797,12 +797,13 @@ path_offline (struct path * pp) > > condlog(3, "%s: path state = %s", pp->dev, buff); > > - if (!strncmp(buff, "offline", 7)) { > + if (!strncmp(buff, "offline", 7) || > + !strncmp(buff, "transport-offline", 17)) { > pp->offline = 1; > return PATH_DOWN; > } > pp->offline = 0; > - if (!strncmp(buff, "blocked", 7)) > + if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7)) > return PATH_PENDING; > else if (!strncmp(buff, "running", 7)) > return PATH_UP; > diff --git a/libmultipath/structs.h b/libmultipath/structs.h > index ab05a78..b9ace36 100644 > --- a/libmultipath/structs.h > +++ b/libmultipath/structs.h > @@ -20,7 +20,7 @@ > #define SCSI_VENDOR_SIZE 9 > #define SCSI_PRODUCT_SIZE 17 > #define SCSI_REV_SIZE 5 > -#define SCSI_STATE_SIZE 9 > +#define SCSI_STATE_SIZE 19 > > #define NO_PATH_RETRY_UNDEF 0 > #define NO_PATH_RETRY_FAIL -1 > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
On jeu., 2013-02-14 at 15:17 +0100, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche <bvanassche@acm.org> > --- Applied. Thanks, Christophe Varoqui www.opensvc.com > libmultipath/discovery.c | 5 +++-- > libmultipath/structs.h | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c > index 3fbc181..0b5fd1d 100644 > --- a/libmultipath/discovery.c > +++ b/libmultipath/discovery.c > @@ -797,12 +797,13 @@ path_offline (struct path * pp) > > condlog(3, "%s: path state = %s", pp->dev, buff); > > - if (!strncmp(buff, "offline", 7)) { > + if (!strncmp(buff, "offline", 7) || > + !strncmp(buff, "transport-offline", 17)) { > pp->offline = 1; > return PATH_DOWN; > } > pp->offline = 0; > - if (!strncmp(buff, "blocked", 7)) > + if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7)) > return PATH_PENDING; > else if (!strncmp(buff, "running", 7)) > return PATH_UP; > diff --git a/libmultipath/structs.h b/libmultipath/structs.h > index ab05a78..b9ace36 100644 > --- a/libmultipath/structs.h > +++ b/libmultipath/structs.h > @@ -20,7 +20,7 @@ > #define SCSI_VENDOR_SIZE 9 > #define SCSI_PRODUCT_SIZE 17 > #define SCSI_REV_SIZE 5 > -#define SCSI_STATE_SIZE 9 > +#define SCSI_STATE_SIZE 19 > > #define NO_PATH_RETRY_UNDEF 0 > #define NO_PATH_RETRY_FAIL -1 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 3fbc181..0b5fd1d 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -797,12 +797,13 @@ path_offline (struct path * pp) condlog(3, "%s: path state = %s", pp->dev, buff); - if (!strncmp(buff, "offline", 7)) { + if (!strncmp(buff, "offline", 7) || + !strncmp(buff, "transport-offline", 17)) { pp->offline = 1; return PATH_DOWN; } pp->offline = 0; - if (!strncmp(buff, "blocked", 7)) + if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7)) return PATH_PENDING; else if (!strncmp(buff, "running", 7)) return PATH_UP; diff --git a/libmultipath/structs.h b/libmultipath/structs.h index ab05a78..b9ace36 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -20,7 +20,7 @@ #define SCSI_VENDOR_SIZE 9 #define SCSI_PRODUCT_SIZE 17 #define SCSI_REV_SIZE 5 -#define SCSI_STATE_SIZE 9 +#define SCSI_STATE_SIZE 19 #define NO_PATH_RETRY_UNDEF 0 #define NO_PATH_RETRY_FAIL -1
Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- libmultipath/discovery.c | 5 +++-- libmultipath/structs.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)