Date: Thu, 19 May 2016 16:04:20 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r300214 - in stable/10: sbin/devd sys/geom Message-ID: <201605191604.u4JG4KpV016356@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Thu May 19 16:04:20 2016 New Revision: 300214 URL: https://svnweb.freebsd.org/changeset/base/300214 Log: MFC r298420, r298439, r298644 r298420 | asomers | 2016-04-21 10:43:15 -0600 (Thu, 21 Apr 2016) | 10 lines Notify userspace listeners when geom disk attributes have changed sys/geom/geom_disk.c: disk_attr_changed(): Generate a devctl event of type GEOM:<attr> for every call. r298439 | asomers | 2016-04-21 15:13:41 -0600 (Thu, 21 Apr 2016) | 10 lines DRY on buffer sizes. Update to r298420. sys/geom/geom_disk.c: In disk_attr_changed, don't repeat a buffer size. r298644 | asomers | 2016-04-26 08:48:58 -0600 (Tue, 26 Apr 2016) | 8 lines Add GEOM::physpath documentation to devd.conf(5) Modified: stable/10/sbin/devd/devd.conf.5 stable/10/sys/geom/geom_disk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devd/devd.conf.5 ============================================================================== --- stable/10/sbin/devd/devd.conf.5 Thu May 19 16:02:02 2016 (r300213) +++ stable/10/sbin/devd/devd.conf.5 Thu May 19 16:04:20 2016 (r300214) @@ -424,6 +424,8 @@ device node is created. A .Xr geom 4 device node is destroyed. +.It Li GEOM::physpath +The physical path of a device has changed. .It Li MEDIACHANGE Physical media has changed. .El Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Thu May 19 16:02:02 2016 (r300213) +++ stable/10/sys/geom/geom_disk.c Thu May 19 16:04:20 2016 (r300214) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/bio.h> +#include <sys/bus.h> #include <sys/ctype.h> #include <sys/fcntl.h> #include <sys/malloc.h> @@ -861,11 +862,15 @@ disk_attr_changed(struct disk *dp, const { struct g_geom *gp; struct g_provider *pp; + char devnamebuf[128]; gp = dp->d_geom; if (gp != NULL) LIST_FOREACH(pp, &gp->provider, provider) (void)g_attr_changed(pp, attr, flag); + snprintf(devnamebuf, sizeof(devnamebuf), "devname=%s%d", dp->d_name, + dp->d_unit); + devctl_notify("GEOM", "disk", attr, devnamebuf); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605191604.u4JG4KpV016356>