a node/dip's devi_ref field seems to be both "transiently" and persistently modified.
eg, on a walk of the device-tree, the kernel will inc/decrement devi_ref.... and so this "transient" modification of devi_ref exists over the lifetime of the dev-tree-walk. from a persistent perspective, devi_ref seems to be incremented for open()'s. i assume the only way to identify who holds a reference to a node/dip is to write a dtrace script? (eg, i'm working an iSCSI bug that has the behavior as described below. eg, the detach(9e) of the Target's node fails, and so part of the OS still sees the iSCSI Target... and part doesn't). I'd like to know who still is referencing the Target/disk. tnx /andrew Javen Wu wrote: > `devfsadm -C` only cleans up the symbol links under /dev/ rather than > /devices/ > > There are two possibilities the nodes under /devices were not cleaned up > after you removed your target. > 1. the nodes were opened or referenced, (devi_ref != 0) during you > removed your target in other side, so ndi_devi_offline() failed in iscsi > initiator driver, the nodes were not removed in device tree. So you saw > them still in format(1M) even the device has already got gone. > > 2. If mpxio enabled, there could be one more potential reason caused by > at least one of pathinfo *not* being freed successfully. During you > removed your iSCSI target, that means all available path should be > removed by mdi_pi_free() in initiator side. Once all paths freed > successfully, the client node under scsi_vhci would be removed > automatically. > > --Javen > > uddaraju varma wrote: > >>Hi All, >> >>Format command fails to refresh available list of disks even after >>deleting the targets on the target side using my iscsi driver. I issue >>devfsadm -C and then issue format command. Format command fails to >>refresh the availble list of disks. >> >>Whereas using solaris software iscsi initiator after logging to the >>targets, I delete some of the targets on the target side and then >>press format command to see the list of available disks. Format >>command still shows the targets that are deleted on the target side. >>But after issuing devfsadm -C command and then i isssue format >>command, Then the format command shows the list of available disks >>correctly, i.e) devfsadm -C removes the deleted targets under >>/devices) and shows the correct output. Format command only shows >>the available disks. >> >>So basically devfsadm -C is not cleaning up the deleted targets under >>/devices whenever my iscsi driver is being used. How do i get the same >>behavior even for my driver so that format command shows only the >>disks that available? >> >>Thanks, >>VarmaUddaraju. >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>driver-discuss mailing list >>[email protected] >>http://mail.opensolaris.org/mailman/listinfo/driver-discuss >> > > > _______________________________________________ > driver-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/driver-discuss _______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
