summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-26 14:53:31 +0000
committerphk <phk@FreeBSD.org>1999-08-26 14:53:31 +0000
commit591c94d4c67807bb48f559afc01b6fb90384559a (patch)
tree73ca4b4fe4032530fe6f8e4ed54f5286fd2242a8 /sys/miscfs
parent2c6415fbf944c8b04586e326b6d563bbb8c9d06b (diff)
downloadFreeBSD-src-591c94d4c67807bb48f559afc01b6fb90384559a.zip
FreeBSD-src-591c94d4c67807bb48f559afc01b6fb90384559a.tar.gz
Simplify the handling of VCHR and VBLK vnodes using the new dev_t:
Make the alias list a SLIST. Drop the "fast recycling" optimization of vnodes (including the returning of a prexisting but stale vnode from checkalias). It doesn't buy us anything now that we don't hardlimit vnodes anymore. Rename checkalias2() and checkalias() to addalias() and addaliasu() - which takes dev_t and udev_t arg respectively. Make the revoke syscalls use vcount() instead of VALIASED. Remove VALIASED flag, we don't need it now and it is faster to traverse the much shorter lists than to maintain the flag. vfs_mountedon() can check the dev_t directly, all the vnodes point to the same one. Print the devicename in specfs/vprint(). Remove a couple of stale LFS vnode flags. Remove unimplemented/unused LK_DRAINED;
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/devfs/devfs_tree.c18
-rw-r--r--sys/miscfs/specfs/spec_vnops.c5
2 files changed, 5 insertions, 18 deletions
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c
index 1e0eed4..c7bfb56 100644
--- a/sys/miscfs/devfs/devfs_tree.c
+++ b/sys/miscfs/devfs/devfs_tree.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: devfs_tree.c,v 1.61 1999/08/25 04:55:18 julian Exp $
+ * $Id: devfs_tree.c,v 1.62 1999/08/25 22:50:11 julian Exp $
*/
@@ -982,23 +982,11 @@ DBPRINT(("(New vnode)"));
break;
case DEV_BDEV:
vn_p->v_type = VBLK;
- if ((nvp = checkalias2(vn_p,
- dnp->by.dev.dev,
- (struct mount *)0)) != NULL)
- {
- vput(vn_p);
- vn_p = nvp;
- }
+ addalias(vn_p, dnp->by.dev.dev);
break;
case DEV_CDEV:
vn_p->v_type = VCHR;
- if ((nvp = checkalias2(vn_p,
- dnp->by.dev.dev,
- (struct mount *)0)) != NULL)
- {
- vput(vn_p);
- vn_p = nvp;
- }
+ addalias(vn_p, dnp->by.dev.dev);
break;
case DEV_DDEV:
break;
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index d353060..ca1835e 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
- * $Id: spec_vnops.c,v 1.97 1999/08/17 04:02:04 alc Exp $
+ * $Id: spec_vnops.c,v 1.98 1999/08/25 00:26:34 julian Exp $
*/
#include <sys/param.h>
@@ -686,8 +686,7 @@ spec_print(ap)
} */ *ap;
{
- printf("tag VT_NON, dev %d, %d\n", major(ap->a_vp->v_rdev),
- minor(ap->a_vp->v_rdev));
+ printf("tag VT_NON, dev %s\n", devtoname(ap->a_vp->v_rdev));
return (0);
}
OpenPOWER on IntegriCloud