diff options
author | njl <njl@FreeBSD.org> | 2003-03-03 19:15:40 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2003-03-03 19:15:40 +0000 |
commit | 5a225ad93319945ddf1088461e0b574dd6daf1f5 (patch) | |
tree | 7305b3cb7830a69706d4f895936e5aaecc614cbe | |
parent | 7e3263308badc4fb7923e001ca3b61ca0cfaa7c0 (diff) | |
download | FreeBSD-src-5a225ad93319945ddf1088461e0b574dd6daf1f5.zip FreeBSD-src-5a225ad93319945ddf1088461e0b574dd6daf1f5.tar.gz |
Finish cleanup of vprint() which was begun with changing v_tag to a string.
Remove extraneous uses of vop_null, instead defering to the default op.
Rename vnode type "vfs" to the more descriptive "syncer".
Fix formatting for various filesystems that use vop_print.
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/deadfs/dead_vnops.c | 1 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 1 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vnops.c | 1 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vnops.c | 1 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 5 | ||||
-rw-r--r-- | sys/fs/udf/udf_vnops.c | 9 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 2 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vnops.c | 2 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vnops.c | 2 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 28 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 2 |
21 files changed, 17 insertions, 63 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 6fa1677..6798fa5 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -789,7 +789,6 @@ static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_read_desc, (vop_t *) cd9660_read }, { &vop_readdir_desc, (vop_t *) cd9660_readdir }, { &vop_readlink_desc, (vop_t *) cd9660_readlink }, @@ -811,7 +810,6 @@ static struct vnodeopv_entry_desc cd9660_specop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { NULL, NULL } @@ -826,7 +824,6 @@ static struct vnodeopv_entry_desc cd9660_fifoop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { NULL, NULL } diff --git a/sys/fs/deadfs/dead_vnops.c b/sys/fs/deadfs/dead_vnops.c index 4cdada5..5566a64 100644 --- a/sys/fs/deadfs/dead_vnops.c +++ b/sys/fs/deadfs/dead_vnops.c @@ -73,7 +73,6 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_open_desc, (vop_t *) dead_open }, { &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */ { &vop_poll_desc, (vop_t *) dead_poll }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_read_desc, (vop_t *) dead_read }, { &vop_readdir_desc, (vop_t *) vop_ebadf }, { &vop_readlink_desc, (vop_t *) vop_ebadf }, diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index a9bace7..dc0053f 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -878,7 +878,6 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = { { &vop_lookup_desc, (vop_t *) devfs_lookup }, { &vop_mknod_desc, (vop_t *) devfs_mknod }, { &vop_pathconf_desc, (vop_t *) devfs_pathconf }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_read_desc, (vop_t *) devfs_read }, { &vop_readdir_desc, (vop_t *) devfs_readdir }, { &vop_readlink_desc, (vop_t *) devfs_readlink }, @@ -902,7 +901,6 @@ static struct vnodeopv_entry_desc devfs_specop_entries[] = { { &vop_access_desc, (vop_t *) devfs_access }, { &vop_getattr_desc, (vop_t *) devfs_getattr }, { &vop_pathconf_desc, (vop_t *) devfs_pathconf }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_reclaim_desc, (vop_t *) devfs_reclaim }, { &vop_remove_desc, (vop_t *) devfs_remove }, { &vop_revoke_desc, (vop_t *) devfs_revoke }, diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 2a50da4..3dfd9dd 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -545,7 +545,6 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_open_desc, (vop_t *) fdesc_open }, { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) fdesc_poll }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_readdir_desc, (vop_t *) fdesc_readdir }, { &vop_reclaim_desc, (vop_t *) fdesc_reclaim }, { &vop_setattr_desc, (vop_t *) fdesc_setattr }, diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c index fe9d36a..40649e1 100644 --- a/sys/fs/hpfs/hpfs_vnops.c +++ b/sys/fs/hpfs/hpfs_vnops.c @@ -628,7 +628,7 @@ hpfs_print(ap) register struct vnode *vp = ap->a_vp; register struct hpfsnode *hp = VTOHP(vp); - printf("ino 0x%x\n", hp->h_no); + printf("\tino 0x%x\n", hp->h_no); return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index e1bf75a..f54fc57 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1797,7 +1797,7 @@ msdosfs_print(ap) { struct denode *dep = VTODE(ap->a_vp); - printf("startcluster %lu, dircluster %lu, diroffset %lu, ", + printf("\tstartcluster %lu, dircluster %lu, diroffset %lu, ", dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset); printf("on dev (%d, %d)\n", major(dep->de_dev), minor(dep->de_dev)); return (0); diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index 90ca4f1..9f86f1e 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -761,7 +761,6 @@ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { { &vop_getattr_desc, (vop_t *)ntfs_getattr }, { &vop_inactive_desc, (vop_t *)ntfs_inactive }, { &vop_reclaim_desc, (vop_t *)ntfs_reclaim }, - { &vop_print_desc, (vop_t *)vop_null }, { &vop_pathconf_desc, ntfs_pathconf }, { &vop_cachedlookup_desc, (vop_t *)ntfs_lookup }, diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 566cd35..588e18c 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -771,8 +771,7 @@ null_print(ap) } */ *ap; { register struct vnode *vp = ap->a_vp; - printf("\ttag %s, vp=%p, lowervp=%p\n", vp->v_tag, vp, - NULLVPTOLOWERVP(vp)); + printf("\tvp=%p, lowervp=%p\n", vp, NULLVPTOLOWERVP(vp)); return (0); } diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c index 59dc234..a026eae 100644 --- a/sys/fs/nwfs/nwfs_vnops.c +++ b/sys/fs/nwfs/nwfs_vnops.c @@ -755,7 +755,7 @@ int nwfs_print (ap) struct vnode *vp = ap->a_vp; struct nwnode *np = VTONW(vp); - printf("nwfs node: name = '%s', fid = %d, pfid = %d\n", + printf("\tnwfs node: name = '%s', fid = %d, pfid = %d\n", np->n_name, np->n_fid.f_id, np->n_fid.f_parent); return (0); } diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index 0d8c06d..397f669 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -561,7 +561,6 @@ static struct vnodeopv_entry_desc portal_vnodeop_entries[] = { { &vop_lookup_desc, (vop_t *) portal_lookup }, { &vop_open_desc, (vop_t *) portal_open }, { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_readdir_desc, (vop_t *) portal_readdir }, { &vop_reclaim_desc, (vop_t *) portal_reclaim }, { &vop_setattr_desc, (vop_t *) portal_setattr }, diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index ee1bee3..d7e235c 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -846,7 +846,7 @@ int smbfs_print (ap) printf("no smbnode data\n"); return (0); } - printf("name = %s, parent = %p, opencount = %d\n", np->n_name, + printf("\tname = %s, parent = %p, opencount = %d\n", np->n_name, np->n_parent ? np->n_parent : NULL, np->n_opencount); return (0); } diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 4cbc308..4f2c145 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -534,7 +534,7 @@ spec_strategy(ap) static int once; if (!once) { - vprint("\nVOP_STRATEGY on VCHR\n", ap->a_vp); + vprint("VOP_STRATEGY on VCHR", ap->a_vp); backtrace(); once++; } @@ -667,8 +667,7 @@ spec_print(ap) } */ *ap; { - printf("tag %s, dev %s\n", ap->a_vp->v_tag, - devtoname(ap->a_vp->v_rdev)); + printf("\tdev %s\n", devtoname(ap->a_vp->v_rdev)); return (0); } diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 45aff3d..6582f92 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -57,7 +57,6 @@ static int udf_read(struct vop_read_args *); static int udf_readdir(struct vop_readdir_args *); static int udf_readlink(struct vop_readlink_args *ap); static int udf_strategy(struct vop_strategy_args *); -static int udf_print(struct vop_print_args *); static int udf_bmap(struct vop_bmap_args *); static int udf_lookup(struct vop_cachedlookup_args *); static int udf_reclaim(struct vop_reclaim_args *); @@ -75,7 +74,6 @@ static struct vnodeopv_entry_desc udf_vnodeop_entries[] = { { &vop_ioctl_desc, (vop_t *) udf_ioctl }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, { &vop_pathconf_desc, (vop_t *) udf_pathconf }, - { &vop_print_desc, (vop_t *) udf_print }, { &vop_read_desc, (vop_t *) udf_read }, { &vop_readdir_desc, (vop_t *) udf_readdir }, { &vop_readlink_desc, (vop_t *) udf_readlink }, @@ -833,13 +831,6 @@ udf_strategy(struct vop_strategy_args *a) } static int -udf_print(struct vop_print_args *a) -{ - printf("%s called\n", __FUNCTION__); - return (EOPNOTSUPP); -} - -static int udf_bmap(struct vop_bmap_args *a) { struct udf_node *node; diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c index a5234cf..6a6dc08 100644 --- a/sys/fs/umapfs/umap_vnops.c +++ b/sys/fs/umapfs/umap_vnops.c @@ -436,8 +436,7 @@ umap_print(ap) } */ *ap; { struct vnode *vp = ap->a_vp; - printf("\ttag %s, vp=%p, lowervp=%p\n", vp->v_tag, vp, - UMAPVPTOLOWERVP(vp)); + printf("\tvp=%p, lowervp=%p\n", vp, UMAPVPTOLOWERVP(vp)); return (0); } diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index a625f29..d8e07bf 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1756,7 +1756,7 @@ union_print(ap) { struct vnode *vp = ap->a_vp; - printf("\ttag %s, vp=%p, uppervp=%p, lowervp=%p\n", vp->v_tag, + printf("\tvp=%p, uppervp=%p, lowervp=%p\n", vp, UPPERVP(vp), LOWERVP(vp)); if (UPPERVP(vp) != NULLVP) vprint("union: upper", UPPERVP(vp)); diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c index e030b7c..7f76f7c 100644 --- a/sys/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/ext2fs/ext2_vnops.c @@ -1498,7 +1498,7 @@ ext2_print(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, + printf("\tino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev)); if (vp->v_type == VFIFO) fifo_printinfo(vp); diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index e030b7c..7f76f7c 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -1498,7 +1498,7 @@ ext2_print(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, + printf("\tino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev)); if (vp->v_type == VFIFO) fifo_printinfo(vp); diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 6fa1677..6798fa5 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -789,7 +789,6 @@ static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_read_desc, (vop_t *) cd9660_read }, { &vop_readdir_desc, (vop_t *) cd9660_readdir }, { &vop_readlink_desc, (vop_t *) cd9660_readlink }, @@ -811,7 +810,6 @@ static struct vnodeopv_entry_desc cd9660_specop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { NULL, NULL } @@ -826,7 +824,6 @@ static struct vnodeopv_entry_desc cd9660_fifoop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_print_desc, (vop_t *) vop_null }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { NULL, NULL } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 127787f..7e21555 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2864,10 +2864,8 @@ vprint(label, vp) printf(" flags (%s),", &buf[1]); lockmgr_printinfo(vp->v_vnlock); printf("\n"); - if (vp->v_data != NULL) { - printf("\t"); + if (vp->v_data != NULL) VOP_PRINT(vp); - } } #ifdef DDB @@ -2892,7 +2890,7 @@ DB_SHOW_COMMAND(lockedvnods, lockedvnodes) mtx_lock(&mntvnode_mtx); TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { if (VOP_ISLOCKED(vp, NULL)) - vprint((char *)0, vp); + vprint(NULL, vp); } mtx_unlock(&mntvnode_mtx); mtx_lock(&mountlist_mtx); @@ -3392,7 +3390,6 @@ vn_pollgone(vp) static int sync_fsync(struct vop_fsync_args *); static int sync_inactive(struct vop_inactive_args *); static int sync_reclaim(struct vop_reclaim_args *); -static int sync_print(struct vop_print_args *); static vop_t **sync_vnodeop_p; static struct vnodeopv_entry_desc sync_vnodeop_entries[] = { @@ -3403,7 +3400,6 @@ static struct vnodeopv_entry_desc sync_vnodeop_entries[] = { { &vop_reclaim_desc, (vop_t *) sync_reclaim }, /* reclaim */ { &vop_lock_desc, (vop_t *) vop_stdlock }, /* lock */ { &vop_unlock_desc, (vop_t *) vop_stdunlock }, /* unlock */ - { &vop_print_desc, (vop_t *) sync_print }, /* print */ { &vop_islocked_desc, (vop_t *) vop_stdislocked }, /* islocked */ { NULL, NULL } }; @@ -3424,7 +3420,7 @@ vfs_allocate_syncvnode(mp) int error; /* Allocate a new vnode */ - if ((error = getnewvnode("vfs", mp, sync_vnodeop_p, &vp)) != 0) { + if ((error = getnewvnode("syncer", mp, sync_vnodeop_p, &vp)) != 0) { mp->mnt_syncer = NULL; return (error); } @@ -3552,24 +3548,6 @@ sync_reclaim(ap) } /* - * Print out a syncer vnode. - */ -static int -sync_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; -{ - struct vnode *vp = ap->a_vp; - - printf("syncer vnode"); - if (vp->v_vnlock != NULL) - lockmgr_printinfo(vp->v_vnlock); - printf("\n"); - return (0); -} - -/* * extract the dev_t from a VCHR */ dev_t diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index bc00477..2a137b7 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -2890,8 +2890,8 @@ nfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); - printf("tag %s fileid %ld fsid 0x%x", - vp->v_tag, np->n_vattr.va_fileid, np->n_vattr.va_fsid); + printf("\tfileid %ld fsid 0x%x", + np->n_vattr.va_fileid, np->n_vattr.va_fsid); if (vp->v_type == VFIFO) fifo_printinfo(vp); printf("\n"); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index af65b36..af7bda2 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1984,7 +1984,7 @@ ufs_print(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, + printf("\tino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev)); if (vp->v_type == VFIFO) fifo_printinfo(vp); |