From owner-svn-src-all@FreeBSD.ORG Wed Jun 12 18:29:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 383B0DB3; Wed, 12 Jun 2013 18:29:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) by mx1.freebsd.org (Postfix) with ESMTP id D46701963; Wed, 12 Jun 2013 18:29:28 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::9d49:a585:bd3b:11af] (unknown [IPv6:2001:7b8:3a7:0:9d49:a585:bd3b:11af]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 73B475C44; Wed, 12 Jun 2013 20:29:26 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r251654 - in head/sys: cam cam/scsi geom From: Dimitry Andric In-Reply-To: <201306121336.r5CDaKUF007665@svn.freebsd.org> Date: Wed, 12 Jun 2013 20:29:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201306121336.r5CDaKUF007665@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2013 18:29:29 -0000 On Jun 12, 2013, at 15:36, Alexander Motin 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.