diff mbox series

libmultipath: Increase SERIAL_SIZE to 128 bytes

Message ID cad99184-26da-c914-84cc-1a49e5e8300a@linux.vnet.ibm.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series libmultipath: Increase SERIAL_SIZE to 128 bytes | expand

Commit Message

KyleMahlkuch Dec. 13, 2018, 4:10 p.m. UTC
Certain IBM FlashSystem LUNs can return up to 85 bytes of serial
number in the Unit Serial Number VPD page, which is larger than
the current SERIAL_SIZE definition of 65 bytes. Since the max
size of this field does not appear to be defined in SPC, increasing
to 128 bytes should hopefully prevent us from hitting this
in future.

This is an example of a serial number from a FlashSystem:
Unit serial number VPD page:
Unit serial number: 3321360050764008101AB300000000000012204214503IBMfcp

Before this patch multipath returns the error:
Jul 17 11:24:58 | vpd pg80 overflow, 85/65 bytes required

After the patch is applied the error no longer occur.

Signed-off-by: Kyle Mahlkuch<kmahlkuc@linux.vnet.ibm.com>
---
  libmultipath/structs.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 1.8.3.1
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Comments

Martin Wilck Dec. 14, 2018, 9:59 a.m. UTC | #1
On Thu, 2018-12-13 at 10:10 -0600, Kyle Mahlkuch wrote:

> Certain IBM FlashSystem LUNs can return up to 85 bytes of serial
> number in the Unit Serial Number VPD page, which is larger than
> the current SERIAL_SIZE definition of 65 bytes. Since the max
> size of this field does not appear to be defined in SPC, increasing
> to 128 bytes should hopefully prevent us from hitting this
> in future.
> 
> This is an example of a serial number from a FlashSystem:
> Unit serial number VPD page:
> Unit serial number:
> 3321360050764008101AB300000000000012204214503IBMfcp

Your example still doesn't fly, this serial number fits nicely in 65
bytes :-)  Anyway, you've shown other examples off-list where the
serial number was actually longer. So:

> Before this patch multipath returns the error:
> Jul 17 11:24:58 | vpd pg80 overflow, 85/65 bytes required
> 
> After the patch is applied the error no longer occur.
> 
> Signed-off-by: Kyle Mahlkuch <kmahlkuc@linux.vnet.ibm.com>

Reviewed-by: Martin Wilck <mwilck@suse.com>

Please resend, and add Christophe to the recepients.

> ---
>  libmultipath/structs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/structs.h b/libmultipath/structs.h
> index bfa660a..00a1b1a 100644
> --- a/libmultipath/structs.h
> +++ b/libmultipath/structs.h
> @@ -8,7 +8,7 @@
>  #include "byteorder.h"
> 
>  #define WWID_SIZE		128
> -#define SERIAL_SIZE		65
> +#define SERIAL_SIZE		128
>  #define NODE_NAME_SIZE		224
>  #define PATH_STR_SIZE		16
>  #define PARAMS_SIZE		4096
> -- 
> 1.8.3.1
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Martin Wilck Dec. 14, 2018, 10:10 a.m. UTC | #2
On Fri, 2018-12-14 at 10:59 +0100, Martin Wilck wrote:
> 
> > Signed-off-by: Kyle Mahlkuch <kmahlkuc@linux.vnet.ibm.com>
> 
> Reviewed-by: Martin Wilck <mwilck@suse.com>
> 
> Please resend, and add Christophe to the recepients.

And when you do that, please send it in a format that applies to 
the current upstream code base 
(http://git.opensvc.com/multipath-tools/.git ) with "git am". 
IOW: plain text.

Yes, it's a trivial change that Christophe could make by hand, but we
want your authorship and your changelog message.

Martin


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index bfa660a..00a1b1a 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -8,7 +8,7 @@ 
  #include "byteorder.h"

  #define WWID_SIZE		128
-#define SERIAL_SIZE		65
+#define SERIAL_SIZE		128
  #define NODE_NAME_SIZE		224
  #define PATH_STR_SIZE		16
  #define PARAMS_SIZE		4096