freebsd-dev/sys/geom
Justin T. Gibbs 416494d7c9 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
2011-06-14 17:10:32 +00:00
..
bde Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
cache Remove unneeded checks, g_new_xxx functions can not fail. 2011-05-04 17:37:37 +00:00
concat Remove "for a moment" assignment. struct g_geom zeroed when allocated. 2011-05-04 17:56:53 +00:00
eli MFC 2011-05-15 15:47:16 +00:00
gate Recognize BIO_FLUSH requests and pass them to userland. 2011-05-23 21:00:37 +00:00
journal Removed KASSERT, g_new_providerf() can not fail. 2011-05-04 18:06:40 +00:00
label When checking existence of providers skip those which are orphaned. 2011-05-04 12:59:11 +00:00
linux_lvm Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
mirror Implement relaxed comparision for hardcoded provider names to make it 2011-04-27 00:10:26 +00:00
mountver Remove unneeded code. 2011-05-04 18:17:21 +00:00
multipath Remove unneeded code. 2011-05-04 18:26:45 +00:00
nop Remove unneeded checks, g_new_xxx functions can not return NULL. 2011-03-31 06:30:59 +00:00
part Add diagnostic message about not aligned partitions. 2011-06-03 06:58:24 +00:00
raid Reduce geom_raid log verbosity. 2011-04-18 16:15:59 +00:00
raid3 Implement relaxed comparision for hardcoded provider names to make it 2011-04-27 00:10:26 +00:00
sched Remove unneeded code. 2011-05-04 18:41:26 +00:00
shsec Remove "for a moment" assignment. struct g_geom zeroed when allocated. 2011-05-04 17:56:53 +00:00
stripe Remove "for a moment" assignment. struct g_geom zeroed when allocated. 2011-05-04 17:56:53 +00:00
uzip Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
vinum Prevent non-aligned reading from provider while tasting. Reject 2011-05-25 11:14:26 +00:00
virstor Implement relaxed comparision for hardcoded provider names to make it 2011-04-27 00:10:26 +00:00
zero In g_zero_destroy_geom(), return 0 instead of EBUSY in the success case. 2010-05-10 19:08:53 +00:00
geom_aes.c
geom_bsd_enc.c
geom_bsd.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom_ccd.c
geom_ctl.c Finish r210923, 210926. Mark some devices as eternal. 2011-01-04 10:59:38 +00:00
geom_ctl.h
geom_dev.c Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
geom_disk.c Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
geom_disk.h Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
geom_dump.c Do not hide stripeoffset from libgeom(3), it may be useful even when 2011-06-02 12:49:45 +00:00
geom_event.c Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
geom_fox.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom_int.h
geom_io.c Correct bioq_disksort so that bioq_insert_tail() offers barrier semantic. 2010-09-02 19:40:28 +00:00
geom_kern.c Move the three geom kprocs as threads under a single pid. 2011-05-11 21:47:30 +00:00
geom_map.c Updates to geom_map from the author. 2011-05-05 14:43:09 +00:00
geom_mbr_enc.c
geom_mbr.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom_pc98_enc.c
geom_pc98.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom_redboot.c - Give geom_redboot taste of flash/spi. Now there is another provider 2010-02-03 01:12:19 +00:00
geom_slice.c
geom_slice.h
geom_subr.c Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
geom_sunlabel_enc.c
geom_sunlabel.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom_vfs.c Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
geom_vfs.h
geom_vol_ffs.c Add some FEATURE macros for various GEOM classes. 2011-02-25 10:24:35 +00:00
geom.h Plumb device physical path reporting from CAM devices, through GEOM and 2011-06-14 17:10:32 +00:00
notes