summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/dev/sdev_subr.c
diff options
context:
space:
mode:
authorPhilip Kirk <Phil.Kirk@Sun.COM>2008-11-06 06:47:54 -0500
committerPhilip Kirk <Phil.Kirk@Sun.COM>2008-11-06 06:47:54 -0500
commitb127ac411761a3d8d642d9342d9cac2785e1faaa (patch)
tree041956f138b0560132678ab9e0971bbb8dff1887 /usr/src/uts/common/fs/dev/sdev_subr.c
parent471fb14e1ef453ca10871d66de96105f33392fe0 (diff)
downloadillumos-joyent-b127ac411761a3d8d642d9342d9cac2785e1faaa.tar.gz
PSARC/2006/475 Clearview: IP Observability Devices
4085089 add a feature to enable 'snooping' of the loopback traffic 6753688 ip netinfo has no need for separate create and dispatch functions 6755448 ifconfig wedged in SIOCLIFREMOVEIF 6756483 incorrect ASSERT() in ip_delmulti[_v6]() 5092073 RFE: allow snoop to filter on zonename or zoneid 6606991 panic assertion failure !ill->ill_join_allmulti for multicast router 6760922 devname doesn't handle stale dev_t's in sdev_node cache entries
Diffstat (limited to 'usr/src/uts/common/fs/dev/sdev_subr.c')
-rw-r--r--usr/src/uts/common/fs/dev/sdev_subr.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/dev/sdev_subr.c b/usr/src/uts/common/fs/dev/sdev_subr.c
index 127329c8d4..9134a4d7ae 100644
--- a/usr/src/uts/common/fs/dev/sdev_subr.c
+++ b/usr/src/uts/common/fs/dev/sdev_subr.c
@@ -614,6 +614,9 @@ static struct sdev_vop_table vtab[] =
{ "net", devnet_vnodeops_tbl, NULL, &devnet_vnodeops, devnet_validate,
SDEV_DYNAMIC | SDEV_VTOR },
+ { "ipnet", devipnet_vnodeops_tbl, NULL, &devipnet_vnodeops,
+ devipnet_validate, SDEV_DYNAMIC | SDEV_VTOR | SDEV_NO_NCACHE },
+
{ NULL, NULL, NULL, NULL, NULL, 0}
};
@@ -2328,7 +2331,7 @@ tryagain:
}
}
-
+lookup_create_node:
/* first thread that is doing the lookup on this node */
if (!dv) {
if (!rw_tryupgrade(&ddv->sdev_contents)) {
@@ -2451,6 +2454,24 @@ found:
switch (vtor(dv)) {
case SDEV_VTOR_VALID:
break;
+ case SDEV_VTOR_STALE:
+ /*
+ * The name exists, but the cache entry is
+ * stale and needs to be re-created.
+ */
+ ASSERT(RW_READ_HELD(&ddv->sdev_contents));
+ if (rw_tryupgrade(&ddv->sdev_contents) == 0) {
+ rw_exit(&ddv->sdev_contents);
+ rw_enter(&ddv->sdev_contents, RW_WRITER);
+ }
+ error = sdev_cache_update(ddv, &dv, nm,
+ SDEV_CACHE_DELETE);
+ rw_downgrade(&ddv->sdev_contents);
+ if (error == 0) {
+ dv = NULL;
+ goto lookup_create_node;
+ }
+ /* FALLTHRU */
case SDEV_VTOR_INVALID:
SD_TRACE_FAILED_LOOKUP(ddv, nm, retried);
sdcmn_err7(("lookup: destroy invalid "