1 # $NetBSD: vchain,v 1.5 2006/11/04 20:33:17 pooka Exp $
3 # @(#)vchain 8.1 (Berkeley) 6/10/93
9 set $vp=(struct vnode *)$arg0
11 printf "vp: 0x%lx freelist_next: 0x%lx usecount: %d flags: i:0x%x v:0x%x u:0x%x\n",\
12 $vp, $vp->v_freelist.tqe_next, $vp->v_uobj.uo_refs, \
13 $vp->v_iflag, $vp->v_vflag, $vp->v_uflag
15 set $vp = $vp->v_mntvnodes.tqe_next
17 printf "Number of vnodes: %d\n", $num
21 Given a vnode, follow its mount pointers
25 set $vp=(struct vnode *)$arg0
26 set $ip=(struct inode *)$vp->v_data
30 set $mp = (struct mount *)$arg0
31 vchain $mp->mnt_vnodelist.tqh_first
34 print the vnode chain for a given mount point
38 set $mp=mountlist.cqh_first
40 printf "\tmount point at 0x%x\n", $mp
42 set $mp=$mp->mnt_list.cqe_next
45 if ((const void *)$mp == (const void *)&mountlist)
51 print vnode chains for all mount points
55 set $mp=mountlist.cqh_first
57 printf "%s on %s type %s, (mp 0x%x, privdata 0x%x)\n", \
58 $mp->mnt_stat->f_mntfromname, $mp->mnt_stat->f_mntonname, \
59 $mp->mnt_op->vfs_name, $mp, $mp->mnt_data
60 set $mp=$mp->mnt_list.cqe_next
61 if ((const void *)$mp == (const void *)&mountlist)