From owner-cvs-src-old@FreeBSD.ORG Tue Jun 14 17:11:24 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8399106566B for ; Tue, 14 Jun 2011 17:11:24 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C39CA8FC1D for ; Tue, 14 Jun 2011 17:11:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5EHBOgE018884 for ; Tue, 14 Jun 2011 17:11:24 GMT (envelope-from gibbs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5EHBOl4018883 for cvs-src-old@freebsd.org; Tue, 14 Jun 2011 17:11:24 GMT (envelope-from gibbs@repoman.freebsd.org) Message-Id: <201106141711.p5EHBOl4018883@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to gibbs@repoman.freebsd.org using -f From: "Justin T. Gibbs" Date: Tue, 14 Jun 2011 17:10:32 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/cam/ata ata_da.c src/sys/cam/scsi scsi_da.c scsi_pass.c src/sys/geom geom.h geom_dev.c geom_disk.c geom_disk.h geom_event.c geom_subr.c src/sys/sys disk.h src/usr.sbin/diskinfo diskinfo.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2011 17:11:25 -0000 gibbs 2011-06-14 17:10:32 UTC FreeBSD src repository Modified files: sys/cam/ata ata_da.c sys/cam/scsi scsi_da.c scsi_pass.c sys/geom geom.h geom_dev.c geom_disk.c geom_disk.h geom_event.c geom_subr.c sys/sys disk.h usr.sbin/diskinfo diskinfo.c Log: SVN rev 223089 on 2011-06-14 17:10:32Z by gibbs Plumb device physical path reporting from CAM devices, through GEOM and DEVFS, and make it accessible via the diskinfo utility. Extend GEOM's generic attribute query mechanism into generic disk consumers. sys/geom/geom_disk.c: sys/geom/geom_disk.h: sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Allow disk providers to implement a new method which can override the default BIO_GETATTR response, d_getattr(struct bio *). This function returns -1 if not handled, otherwise it returns 0 or an errno to be passed to g_io_deliver(). sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Don't copy the serial number to dp->d_ident anymore, as the CAM XPT is now responsible for returning this information via d_getattr()->(a)dagetattr()->xpt_getatr(). sys/geom/geom_dev.c: - Implement a new ioctl, DIOCGPHYSPATH, which returns the GEOM attribute "GEOM::physpath", if possible. If the attribute request returns a zero-length string, ENOENT is returned. usr.sbin/diskinfo/diskinfo.c: - If the DIOCGPHYSPATH ioctl is successful, report physical path data when diskinfo is executed with the '-v' option. Submitted by: will Reviewed by: gibbs Sponsored by: Spectra Logic Corporation Add generic attribute change notification support to GEOM. sys/sys/geom/geom.h: Add a new attrchanged method field to both g_class and g_geom. sys/sys/geom/geom.h: sys/geom/geom_event.c: - Provide the g_attr_changed() function that providers can use to advertise attribute changes. - Perform delivery of attribute change notifications from a thread context via the standard GEOM event mechanism. sys/geom/geom_subr.c: Inherit the attrchanged method from class to geom (class instance). sys/geom/geom_disk.c: Provide disk_attr_changed() to provide g_attr_changed() access to consumers of the disk API. sys/cam/scsi/scsi_pass.c: sys/cam/scsi/scsi_da.c: sys/geom/geom_dev.c: sys/geom/geom_disk.c: Use attribute changed events to track updates to physical path information. sys/cam/scsi/scsi_da.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, and the updated buffer type references our physical path attribute, emit a GEOM attribute changed event via the disk_attr_changed() API. sys/cam/scsi/scsi_pass.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, update the physical patch devfs alias for this pass instance. Submitted by: gibbs Sponsored by: Spectra Logic Corporation Revision Changes Path 1.34 +20 -2 src/sys/cam/ata/ata_da.c 1.261 +54 -13 src/sys/cam/scsi/scsi_da.c 1.61 +66 -9 src/sys/cam/scsi/scsi_pass.c 1.111 +5 -0 src/sys/geom/geom.h 1.111 +51 -1 src/sys/geom/geom_dev.c 1.119 +21 -0 src/sys/geom/geom_disk.c 1.12 +3 -0 src/sys/geom/geom_disk.h 1.60 +47 -0 src/sys/geom/geom_event.c 1.112 +1 -0 src/sys/geom/geom_subr.c 1.50 +8 -0 src/sys/sys/disk.h 1.13 +4 -1 src/usr.sbin/diskinfo/diskinfo.c