Date: Wed, 12 Jun 2013 20:29:25 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Alexander Motin <mav@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r251654 - in head/sys: cam cam/scsi geom Message-ID: <CA6AD904-41B9-48C9-841A-9BA8A61C98B4@FreeBSD.org> In-Reply-To: <201306121336.r5CDaKUF007665@svn.freebsd.org> References: <201306121336.r5CDaKUF007665@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 12, 2013, at 15:36, Alexander Motin <mav@FreeBSD.org> wrote: > Author: mav > Date: Wed Jun 12 13:36:20 2013 > New Revision: 251654 > URL: http://svnweb.freebsd.org/changeset/base/251654 >=20 > Log: > Make CAM return and GEOM DISK pass through new GEOM::lunid attribute. >=20 > SPC-4 specification states that serial number may be property of = device, > but not a specific logical unit. People reported about FC storages = using > serial number in that way, making it unusable for purposes of LUN = multipath > detection. SPC-4 states that designators associated with logical = unit from > the VPD page 83h "Device Identification" should be used for that = purpose. > Report first of them in the new attribute in such preference order: = NAA, > EUI-64, T10 and SCSI name string. >=20 > While there, make GEOM DISK properly report GEOM::ident in XML output = also > using d_getattr() method, if available. This fixes serial numbers = reporting > for SCSI disks in `geom disk list` output and confxml. >=20 > Discussed with: gibbs, ken > Sponsored by: iXsystems, Inc. > MFC after: 2 weeks >=20 > Modified: > head/sys/cam/cam_xpt.c > head/sys/cam/scsi/scsi_all.c > head/sys/cam/scsi/scsi_all.h > head/sys/cam/scsi/scsi_enc_ses.c > head/sys/geom/geom_disk.c .... > Modified: head/sys/cam/scsi/scsi_all.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/scsi/scsi_all.h Wed Jun 12 13:17:43 2013 = (r251653) > +++ head/sys/cam/scsi/scsi_all.h Wed Jun 12 13:36:20 2013 = (r251654) > @@ -1292,6 +1292,7 @@ struct scsi_vpd_id_descriptor > #define SVPD_ID_PROTO_SHIFT 4 > #define SVPD_ID_CODESET_BINARY 0x01 > #define SVPD_ID_CODESET_ASCII 0x02 > +#define SVPD_ID_CODESET_UTF8 0x03 > #define SVPD_ID_CODESET_MASK 0x0f > u_int8_t id_type; > #define SVPD_ID_PIV 0x80 > @@ -2316,7 +2317,12 @@ u_int scsi_calc_syncparam(u_int = period) > typedef int (*scsi_devid_checkfn_t)(uint8_t *); > int scsi_devid_is_naa_ieee_reg(uint8_t *bufp); > int scsi_devid_is_sas_target(uint8_t *bufp); > -uint8_t * scsi_get_devid(struct scsi_vpd_device_id *id, uint32_t = len, > +int scsi_devid_is_lun_eui64(uint8_t *bufp); > +int scsi_devid_is_lun_naa(uint8_t *bufp); > +int scsi_devid_is_lun_name(uint8_t *bufp); > +int scsi_devid_is_lun_t10(uint8_t *bufp); > +struct scsi_vpd_id_descriptor * > + scsi_get_devid(struct scsi_vpd_device_id *id, uint32_t = len, > scsi_devid_checkfn_t ck_fn); This prototype change breaks head: cc -O2 -pipe -DRESCUE -std=3Dgnu99 -Qunused-arguments = -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W = -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes = -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch = -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline = -Wnested-externs -Wredundant-decls -Wold-style-definition = -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body = -Wno-string-plus-int -c /src/sbin/camcontrol/camcontrol.c /src/sbin/camcontrol/camcontrol.c:6955:13: error: incompatible pointer = types assigning to 'uint8_t *' (aka 'unsigned char *') from 'struct = scsi_vpd_id_descriptor *' [-Werror,-Wincompatible-pointer-types] item_addr =3D scsi_get_devid(item->device_id, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA6AD904-41B9-48C9-841A-9BA8A61C98B4>