This diff changes the VPD page with the serial numbers so that OpenBSD and
Solaris are able to use the netbsd-iscsi-target via multipath.
With this in I'm able to add the iscsi-target to sym(4) and so the
disk is not lost when iscsid is restarted.

According to dlg@ the NetBSD code is wrong and that's why this diff came
up.
-- 
:wq Claudio

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/netbsd-iscsi-target/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile    21 Feb 2012 22:41:30 -0000      1.3
+++ Makefile    20 Mar 2012 07:11:19 -0000
@@ -4,6 +4,7 @@ COMMENT=        iSCSI (RFC 3720) target from Ne
 
 DISTNAME=      netbsd-iscsi-20111006
 PKGNAME=       ${DISTNAME:S/-iscsi/-iscsi-target/}
+REVISION=      1
 
 CATEGORIES=    net sysutils
 
Index: patches/patch-src_lib_disk_c
===================================================================
RCS file: patches/patch-src_lib_disk_c
diff -N patches/patch-src_lib_disk_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lib_disk_c        20 Mar 2012 07:04:06 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/lib/disk.c.orig        Tue Mar 16 15:27:17 2010
++++ src/lib/disk.c     Tue Mar 20 08:03:58 2012
+@@ -1057,7 +1057,7 @@ device_vpd(iscsi_target_t *tgt, uint8_t *data, uint8_t
+       cp[0] = (INQUIRY_DEVICE_ISCSI_PROTOCOL << 4) |
+               INQUIRY_DEVICE_CODESET_UTF8;
+       cp[1] = (INQUIRY_DEVICE_PIV << 7) |
+-              (INQUIRY_DEVICE_ASSOCIATION_TARGET_DEVICE << 4) |
++              (INQUIRY_DEVICE_ASSOCIATION_LOGICAL_UNIT << 4) |
+               INQUIRY_IDENTIFIER_TYPE_T10;
+       strpadcpy(&cp[4], 8, ISCSI_VENDOR, strlen(ISCSI_VENDOR), ' ');
+       len = 8;

Reply via email to