From: Antonio Huete Jimenez Date: Sun, 26 Jul 2015 14:49:35 +0000 (-0700) Subject: dirfs - Change debug levels X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/26ec059c47252adef968f37eda2946708023db0d dirfs - Change debug levels - Specific debug levels are specified for easier debugging: 1 Calls to VFS operations (mount, umount, ...) 3 Calls to VN operations (open, close, read, ...) 5 Calls to subroutines 9 Everything - Once dirfs is stabilised, debugging facilities will go and only KTR will remain. --- diff --git a/sys/vfs/dirfs/dirfs.h b/sys/vfs/dirfs/dirfs.h index e070f42335..e0d7d53e7f 100644 --- a/sys/vfs/dirfs/dirfs.h +++ b/sys/vfs/dirfs/dirfs.h @@ -73,19 +73,22 @@ extern int getdirentries(int, char *, int, long *); extern int statfs(const char *, struct statfs *); /* - * Debugging macros. The impact should be determined and in case it has a - * considerable performance penalty, it should be enclosed in a DEBUG #ifdef. + * Debugging macros. + * + * LEVEL USED FOR + * + * 1 Calls to VFS operations (mount, umount, ...) + * 3 Calls to VN operations (open, close, read, ...) + * 5 Calls to subroutines + * 9 Everything + * */ -#define debug_called() do { \ - dbg(9, "called\n", __func__); \ -} while(0) - #define dbg(lvl, fmt, ...) do { \ debug(lvl, "%s: " fmt, __func__, ##__VA_ARGS__); \ } while(0) #define debug_node(s) do { \ - dbg(5, "mode=%u flags=%u dn_name=%s " \ + dbg(9, "mode=%u flags=%u dn_name=%s " \ "uid=%u gid=%u objtype=%u nlinks=%d " \ "size=%jd ctime=%ju atime=%ju mtime=%ju\n", \ s->dn_mode, s->dn_flags, s->dn_name, \ @@ -96,7 +99,7 @@ extern int statfs(const char *, struct statfs *); } while(0) #define debug_node2(n) do { \ - dbg(5, "dnp=%p name=%s fd=%d parent=%p vnode=%p " \ + dbg(9, "dnp=%p name=%s fd=%d parent=%p vnode=%p " \ "refcnt=%d state=%s\n", \ n, n->dn_name, n->dn_fd, n->dn_parent, n->dn_vnode, \ n->dn_refcnt, dirfs_flag2str(n)); \ diff --git a/sys/vfs/dirfs/dirfs_subr.c b/sys/vfs/dirfs/dirfs_subr.c index 1989c5280c..6ece42e733 100644 --- a/sys/vfs/dirfs/dirfs_subr.c +++ b/sys/vfs/dirfs/dirfs_subr.c @@ -56,7 +56,7 @@ void dirfs_node_setname(dirfs_node_t dnp, const char *name, int len) { - debug_called(); + dbg(5, "called\n"); if (dnp->dn_name) kfree(dnp->dn_name, M_DIRFS_MISC); @@ -75,7 +75,7 @@ dirfs_node_alloc(struct mount *mp) { dirfs_node_t dnp; - debug_called(); + dbg(5, "called\n"); dnp = kmalloc(sizeof(*dnp), M_DIRFS_NODE, M_WAITOK | M_ZERO); lockinit(&dnp->dn_lock, "dfsnode", 0, LK_CANRECURSE); @@ -91,6 +91,8 @@ dirfs_node_alloc(struct mount *mp) void dirfs_node_drop(dirfs_mount_t dmp, dirfs_node_t dnp) { + dbg(5, "called\n"); + if (dirfs_node_unref(dnp)) dirfs_node_free(dmp, dnp); } @@ -105,7 +107,7 @@ dirfs_node_free(dirfs_mount_t dmp, dirfs_node_t dnp) { struct vnode *vp; - debug_called(); + dbg(5, "called\n"); KKASSERT(dnp != NULL); debug_node2(dnp); @@ -171,7 +173,7 @@ dirfs_alloc_file(dirfs_mount_t dmp, dirfs_node_t *dnpp, dirfs_node_t pdnp, char *pathfree; int error; - debug_called(); + dbg(5, "called\n"); error = 0; vp = NULL; @@ -215,7 +217,7 @@ dirfs_alloc_file(dirfs_mount_t dmp, dirfs_node_t *dnpp, dirfs_node_t pdnp, *vpp = vp; *dnpp = dnp; - dbg(5, "tmp=%s dnp=%p allocated\n", tmp, dnp); + dbg(9, "tmp=%s dnp=%p allocated\n", tmp, dnp); dirfs_dropfd(dmp, pathnp, pathfree); /* We want VOP_INACTIVE() to be called on last ref */ @@ -235,7 +237,7 @@ dirfs_alloc_vp(struct mount *mp, struct vnode **vpp, int lkflags, struct vnode *vp; dirfs_mount_t dmp = VFS_TO_DIRFS(mp); - debug_called(); + dbg(5, "called\n"); /* * Handle vnode reclaim/alloc races @@ -288,7 +290,7 @@ dirfs_alloc_vp(struct mount *mp, struct vnode **vpp, int lkflags, } KKASSERT(vp != NULL); *vpp = vp; - dbg(5, "dnp=%p vp=%p type=%d\n", dnp, vp, vp->v_type); + dbg(9, "dnp=%p vp=%p type=%d\n", dnp, vp, vp->v_type); } /* @@ -299,6 +301,8 @@ dirfs_free_vp(dirfs_mount_t dmp, dirfs_node_t dnp) { struct vnode *vp = NODE_TO_VP(dnp); + dbg(5, "called\n"); + dnp->dn_vnode = NULL; vp->v_data = NULL; dirfs_node_drop(dmp, dnp); @@ -310,8 +314,6 @@ dirfs_nodetype(struct stat *st) int ret; mode_t mode = st->st_mode; - debug_called(); - if (S_ISDIR(mode)) ret = VDIR; else if (S_ISBLK(mode)) @@ -338,7 +340,7 @@ dirfs_node_stat(int fd, const char *path, dirfs_node_t dnp) struct stat st; int error; - debug_called(); + dbg(5, "called\n"); if (fd == DIRFS_NOFD) error = lstat(path, &st); else @@ -383,7 +385,7 @@ dirfs_node_absolute_path_plus(dirfs_mount_t dmp, dirfs_node_t cur, char *buf; int count; - debug_called(); + dbg(5, "called\n"); KKASSERT(dmp->dm_root); /* Sanity check */ *pathfreep = NULL; @@ -433,7 +435,7 @@ dirfs_node_absolute_path_plus(dirfs_mount_t dmp, dirfs_node_t cur, if (dnp1 && count <= MAXPATHLEN) { bcopy(dmp->dm_path, &buf[MAXPATHLEN - count], len); *pathfreep = buf; - dbg(5, "absolute_path %s\n", &buf[MAXPATHLEN - count]); + dbg(9, "absolute_path %s\n", &buf[MAXPATHLEN - count]); return (&buf[MAXPATHLEN - count]); } else { kfree(buf, M_DIRFS_MISC); @@ -455,7 +457,7 @@ dirfs_findfd(dirfs_mount_t dmp, dirfs_node_t cur, int count; char *buf; - debug_called(); + dbg(5, "called\n"); *pathfreep = NULL; *pathto = NULL; @@ -484,10 +486,10 @@ dirfs_findfd(dirfs_mount_t dmp, dirfs_node_t cur, *pathfreep = buf; *pathto = &buf[MAXPATHLEN - count + 1]; /* skip '/' prefix */ dirfs_node_ref(dnp1); - dbg(5, "fd=%d dnp1=%p dnp1->dn_name=%d &buf[off]=%s\n", + dbg(9, "fd=%d dnp1=%p dnp1->dn_name=%d &buf[off]=%s\n", dnp1->dn_fd, dnp1, dnp1->dn_name, *pathto); } else { - dbg(5, "failed too long\n"); + dbg(9, "failed too long\n"); kfree(buf, M_DIRFS_MISC); *pathfreep = NULL; *pathto = NULL; @@ -564,7 +566,7 @@ dirfs_open_helper(dirfs_mount_t dmp, dirfs_node_t dnp, int parentfd, int perms; int error; - debug_called(); + dbg(5, "called\n"); flags = error = perms = 0; tmp = NULL; @@ -603,7 +605,7 @@ dirfs_open_helper(dirfs_mount_t dmp, dirfs_node_t dnp, int parentfd, if (dnp->dn_fd == -1) error = errno; - dbg(5, "dnp=%p tmp2=%s parentfd=%d flags=%d error=%d " + dbg(9, "dnp=%p tmp2=%s parentfd=%d flags=%d error=%d " "flags=%08x w=%d x=%d\n", dnp, tmp, parentfd, flags, error, perms); @@ -618,11 +620,11 @@ dirfs_close_helper(dirfs_node_t dnp) { int error = 0; - debug_called(); + dbg(5, "called\n"); if (dnp->dn_fd != DIRFS_NOFD) { - dbg(5, "closed fd on dnp=%p\n", dnp); + dbg(9, "closed fd on dnp=%p\n", dnp); #if 0 /* buffer cache buffers may still be present */ error = close(dnp->dn_fd); /* XXX EINTR should be checked */ @@ -648,8 +650,6 @@ dirfs_node_chtimes(dirfs_node_t dnp) char *tmp; char *pathfree; - debug_called(); - vp = NODE_TO_VP(dnp); dmp = VFS_TO_DIRFS(vp->v_mount); @@ -682,8 +682,6 @@ dirfs_node_chflags(dirfs_node_t dnp, int vaflags, struct ucred *cred) char *tmp; char *pathfree; - debug_called(); - vp = NODE_TO_VP(dnp); dmp = VFS_TO_DIRFS(vp->v_mount); @@ -760,8 +758,6 @@ dirfs_node_chsize(dirfs_node_t dnp, off_t nsize) off_t osize; int biosize; - debug_called(); - KKASSERT(dnp); vp = NODE_TO_VP(dnp); @@ -793,7 +789,7 @@ dirfs_node_chsize(dirfs_node_t dnp, off_t nsize) error = errno; if (error == 0) dnp->dn_size = nsize; - dbg(5, "TRUNCATE %016jx %016jx\n", (intmax_t)nsize, dnp->dn_size); + dbg(9, "TRUNCATE %016jx %016jx\n", (intmax_t)nsize, dnp->dn_size); /*dirfs_node_stat(DIRFS_NOFD, tmp, dnp); don't need to do this*/ dirfs_dropfd(dmp, NULL, pathfree); @@ -809,6 +805,8 @@ dirfs_node_setpassive(dirfs_mount_t dmp, dirfs_node_t dnp, int state) { struct vnode *vp; + dbg(5, "dnp=%p state=%d dnp->dn_fd=%d\n", dnp, state, dnp->dn_fd); + if (state && (dnp->dn_state & DIRFS_PASVFD) == 0 && dnp->dn_fd != DIRFS_NOFD) { dirfs_node_ref(dnp); @@ -831,8 +829,8 @@ dirfs_node_setpassive(dirfs_mount_t dmp, dirfs_node_t dnp, int state) TAILQ_REMOVE(&dmp->dm_fdlist, dnp, dn_fdentry); --dirfs_fd_used; --dmp->dm_fd_used; - dbg(5, "dnp=%p removed from fdlist. %d used\n", - dnp, dirfs_fd_used); + dbg(5, "dnp=%p removed from fdlist. %d used refs=%d\n", + dnp, dirfs_fd_used, dirfs_node_refcnt(dnp)); /* * Attempt to close the descriptor. We can only do this @@ -855,14 +853,14 @@ dirfs_node_setpassive(dirfs_mount_t dmp, dirfs_node_t dnp, int state) !dirfs_node_isroot(dnp) && (vp->v_flag & (VINACTIVE|VOBJDIRTY)) == VINACTIVE && RB_EMPTY(&vp->v_rbdirty_tree)) { - dbg(5, "passive cache: closing %d\n", dnp->dn_fd); + dbg(9, "passive cache: closing %d\n", dnp->dn_fd); close(dnp->dn_fd); dnp->dn_fd = DIRFS_NOFD; } else { if (dirfs_node_refcnt(dnp) == 1 && dnp->dn_vnode == NULL && dnp->dn_fd != DIRFS_NOFD && dnp != dmp->dm_root) { - dbg(5, "passive cache: closing %d\n", dnp->dn_fd); + dbg(9, "passive cache: closing %d\n", dnp->dn_fd); close(dnp->dn_fd); dnp->dn_fd = DIRFS_NOFD; } @@ -894,4 +892,3 @@ debug(int level, const char *fmt, ...) __va_end(ap); } } - diff --git a/sys/vfs/dirfs/dirfs_vfsops.c b/sys/vfs/dirfs/dirfs_vfsops.c index afdf19ad7a..b77737fc46 100644 --- a/sys/vfs/dirfs/dirfs_vfsops.c +++ b/sys/vfs/dirfs/dirfs_vfsops.c @@ -103,7 +103,7 @@ dirfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) size_t done, nlen; int error; - debug_called(); + dbg(1, "called\n"); if (mp->mnt_flag & MNT_UPDATE) { dmp = VFS_TO_DIRFS(mp); @@ -182,7 +182,7 @@ dirfs_unmount(struct mount *mp, int mntflags) int cnt; int error; - debug_called(); + dbg(1, "called\n"); cnt = 0; dmp = VFS_TO_DIRFS(mp); @@ -227,7 +227,7 @@ dirfs_root(struct mount *mp, struct vnode **vpp) int fd; int error; - debug_called(); + dbg(1, "called\n"); dmp = VFS_TO_DIRFS(mp); KKASSERT(dmp != NULL); @@ -258,7 +258,7 @@ dirfs_root(struct mount *mp, struct vnode **vpp) */ fd = open(dmp->dm_path, O_DIRECTORY); if (fd == -1) { - dbg(5, "failed to open ROOT node\n"); + dbg(9, "failed to open ROOT node\n"); dirfs_free_vp(dmp, dnp); dirfs_node_free(dmp, dnp); return errno; @@ -282,7 +282,7 @@ dirfs_root(struct mount *mp, struct vnode **vpp) static int dirfs_fhtovp(struct mount *mp, struct vnode *rootvp, struct fid *fhp, struct vnode **vpp) { - debug_called(); + dbg(1, "called\n"); return EOPNOTSUPP; } @@ -293,7 +293,7 @@ dirfs_statfs(struct mount *mp, struct statfs *sbp, struct ucred *cred) dirfs_mount_t dmp = VFS_TO_DIRFS(mp); struct statfs st; - debug_called(); + dbg(1, "called\n"); if((statfs(dmp->dm_path, &st)) == -1) return errno; @@ -312,7 +312,7 @@ dirfs_statvfs(struct mount *mp, struct statvfs *sbp, struct ucred *cred) dirfs_mount_t dmp = VFS_TO_DIRFS(mp); struct statvfs st; - debug_called(); + dbg(1, "called\n"); if ((statvfs(dmp->dm_path, &st)) == -1) return errno; @@ -329,7 +329,7 @@ dirfs_vptofh(struct vnode *vp, struct fid *fhp) dnp = VP_TO_NODE(vp); debug_node2(dnp); - debug_called(); + dbg(1, "called\n"); return EOPNOTSUPP; } @@ -338,7 +338,7 @@ static int dirfs_checkexp(struct mount *mp, struct sockaddr *nam, int *exflagsp, struct ucred **credanonp) { - debug_called(); + dbg(1, "called\n"); return EOPNOTSUPP; } diff --git a/sys/vfs/dirfs/dirfs_vnops.c b/sys/vfs/dirfs/dirfs_vnops.c index 8f4d9461eb..7038ef73e2 100644 --- a/sys/vfs/dirfs/dirfs_vnops.c +++ b/sys/vfs/dirfs/dirfs_vnops.c @@ -184,7 +184,7 @@ dirfs_nresolve(struct vop_nresolve_args *ap) struct mount *mp; int error; - debug_called(); + dbg(3, "called\n"); error = 0; nch = ap->a_nch; @@ -217,9 +217,6 @@ dirfs_nresolve(struct vop_nresolve_args *ap) } if (vp) { - if ((vp->v_refcnt & VREF_FINALIZE) == 0) - atomic_set_int(&vp->v_refcnt, VREF_FINALIZE); - if (error && error == ENOENT) { cache_setvp(nch, NULL); } else { @@ -237,7 +234,7 @@ dirfs_nresolve(struct vop_nresolve_args *ap) static int dirfs_nlookupdotdot(struct vop_nlookupdotdot_args *ap) { - debug_called(); + dbg(3, "called\n"); KTR_LOG(dirfs_unsupported, __func__); @@ -257,7 +254,7 @@ dirfs_ncreate(struct vop_ncreate_args *ap) int perms = 0; int error; - debug_called(); + dbg(3, "called\n"); error = 0; dnp = NULL; @@ -292,7 +289,7 @@ dirfs_ncreate(struct vop_ncreate_args *ap) static int dirfs_nmknod(struct vop_nmknod_args *v) { - debug_called(); + dbg(3, "called\n"); return EOPNOTSUPP; } @@ -305,7 +302,7 @@ dirfs_open(struct vop_open_args *ap) struct vnode *vp; int error; - debug_called(); + dbg(3, "called\n"); vp = ap->a_vp; dnp = VP_TO_NODE(vp); @@ -334,7 +331,7 @@ dirfs_close(struct vop_close_args *ap) dirfs_node_t dnp; int error; - debug_called(); + dbg(3, "called\n"); error = 0; vp = ap->a_vp; @@ -343,7 +340,7 @@ dirfs_close(struct vop_close_args *ap) if (vp->v_type == VREG) { error = vfsync(vp, 0, 1, NULL, NULL); if (error) - dbg(5, "vfsync error=%d\n", error); + dbg(9, "vfsync error=%d\n", error); } vop_stdclose(ap); @@ -360,7 +357,7 @@ dirfs_access(struct vop_access_args *ap) int error; dirfs_node_t dnp; - debug_called(); + dbg(3, "called\n"); dnp = VP_TO_NODE(vp); @@ -410,7 +407,7 @@ dirfs_getattr(struct vop_getattr_args *ap) char *pathfree; int error; - debug_called(); + dbg(3, "called\n"); vp = ap->a_vp; vap = ap->a_vap; @@ -479,7 +476,7 @@ dirfs_setattr(struct vop_setattr_args *ap) #endif int msgno; - debug_called(); + dbg(3, "called\n"); error = msgno = 0; vp = ap->a_vp; @@ -522,7 +519,7 @@ dirfs_setattr(struct vop_setattr_args *ap) error = EROFS; else error = dirfs_node_chsize(dnp, vap->va_size); - dbg(2, "dnp size=%jd vap size=%jd\n", dnp->dn_size, vap->va_size); + dbg(9, "dnp size=%jd vap size=%jd\n", dnp->dn_size, vap->va_size); msgno = 2; goto out; } @@ -605,7 +602,7 @@ dirfs_fsync(struct vop_fsync_args *ap) dirfs_node_t dnp = VP_TO_NODE(ap->a_vp); int error = 0; - debug_called(); + dbg(3, "called\n"); vfsync(ap->a_vp, ap->a_waitfor, 1, NULL, NULL); @@ -631,11 +628,11 @@ dirfs_read(struct vop_read_args *ap) size_t len; int error; - debug_called(); + dbg(3, "called\n"); error = 0; if (uio->uio_resid == 0) { - dbg(5, "zero len uio->uio_resid\n"); + dbg(9, "zero len uio->uio_resid\n"); return error; } @@ -659,7 +656,7 @@ dirfs_read(struct vop_read_args *ap) if (error) { brelse(bp); lwkt_reltoken(&vp->v_mount->mnt_token); - dbg(5, "dirfs_read bread error %d\n", error); + dbg(9, "dirfs_read bread error %d\n", error); break; } lwkt_reltoken(&vp->v_mount->mnt_token); @@ -677,7 +674,7 @@ dirfs_read(struct vop_read_args *ap) error = uiomovebp(bp, (char *)bp->b_data + offset, len, uio); bqrelse(bp); if (error) { - dbg(5, "dirfs_read uiomove error %d\n", error); + dbg(9, "dirfs_read uiomove error %d\n", error); break; } } @@ -704,11 +701,11 @@ dirfs_write (struct vop_write_args *ap) size_t len; struct rlimit limit; - debug_called(); + dbg(3, "called\n"); error = 0; if (uio->uio_resid == 0) { - dbg(5, "zero-length uio->uio_resid\n"); + dbg(9, "zero-length uio->uio_resid\n"); return error; } @@ -721,11 +718,11 @@ dirfs_write (struct vop_write_args *ap) if (vp->v_type == VREG && td != NULL) { error = kern_getrlimit(RLIMIT_FSIZE, &limit); if (error != 0) { - dbg(5, "rlimit failure\n"); + dbg(9, "rlimit failure\n"); return error; } if (uio->uio_offset + uio->uio_resid > limit.rlim_cur) { - dbg(5, "file too big\n"); + dbg(9, "file too big\n"); ksignal(td->td_proc, SIGXFSZ); return (EFBIG); } @@ -763,12 +760,12 @@ dirfs_write (struct vop_write_args *ap) error = uiomovebp(bp, (char *)bp->b_data + offset, len, uio); if (error) { brelse(bp); - dbg(2, "WRITE uiomove failed\n"); + dbg(9, "WRITE uiomove failed\n"); break; } -// dbg(2, "WRITE dn_size=%jd uio_offset=%jd uio_resid=%jd base_offset=%jd\n", -// dnp->dn_size, uio->uio_offset, uio->uio_resid, base_offset); + dbg(9, "WRITE dn_size=%jd uio_offset=%jd uio_resid=%jd base_offset=%jd\n", + dnp->dn_size, uio->uio_offset, uio->uio_resid, base_offset); if (ap->a_ioflag & IO_SYNC) bwrite(bp); @@ -788,7 +785,7 @@ dirfs_advlock (struct vop_advlock_args *ap) struct vnode *vp = ap->a_vp; dirfs_node_t dnp = VP_TO_NODE(vp); - debug_called(); + dbg(3, "called\n"); return (lf_advlock(ap, &dnp->dn_advlock, dnp->dn_size)); } @@ -806,7 +803,7 @@ dirfs_strategy(struct vop_strategy_args *ap) char *tmp; char *pathfree; - debug_called(); + dbg(3, "called\n"); dnp = VP_TO_NODE(vp); dmp = VFS_TO_DIRFS(vp->v_mount); @@ -814,7 +811,7 @@ dirfs_strategy(struct vop_strategy_args *ap) error = 0; if (vp->v_type != VREG) { - dbg(5, "not VREG\n"); + dbg(9, "not VREG\n"); bp->b_resid = bp->b_bcount; bp->b_flags |= B_ERROR | B_INVAL; bp->b_error = EINVAL; @@ -850,7 +847,7 @@ dirfs_strategy(struct vop_strategy_args *ap) bzero(bp->b_data + error, bp->b_bcount - error); if (error < 0 && errno != EINTR) { - dbg(5, "error=%d dnp=%p dnp->dn_fd=%d " + dbg(9, "error=%d dnp=%p dnp->dn_fd=%d " "bio->bio_offset=%ld bcount=%d resid=%d iosize=%zd\n", errno, dnp, dnp->dn_fd, bio->bio_offset, bp->b_bcount, bp->b_resid, iosize); @@ -874,7 +871,7 @@ dirfs_strategy(struct vop_strategy_args *ap) static int dirfs_bmap(struct vop_bmap_args *ap) { - debug_called(); + dbg(3, "called\n"); if (ap->a_doffsetp != NULL) *ap->a_doffsetp = ap->a_loffset; @@ -900,7 +897,8 @@ dirfs_nremove(struct vop_nremove_args *ap) int error; char *tmp; char *pathfree; - debug_called(); + + dbg(3, "called\n"); error = 0; tmp = NULL; @@ -949,7 +947,7 @@ dirfs_nremove(struct vop_nremove_args *ap) static int dirfs_nlink(struct vop_nlink_args *ap) { - debug_called(); + dbg(3, "called\n"); KTR_LOG(dirfs_unsupported, __func__); @@ -968,7 +966,7 @@ dirfs_nrename(struct vop_nrename_args *ap) char *tpath, *tpathfree; int error; - debug_called(); + dbg(3, "called\n"); error = 0; fdvp = ap->a_fdvp; @@ -980,7 +978,7 @@ dirfs_nrename(struct vop_nrename_args *ap) fdnp = VP_TO_NODE(fdvp); tdnp = VP_TO_NODE(tdvp); - dbg(5, "fdnp=%p tdnp=%p from=%s to=%s\n", fdnp, tdnp, fncp->nc_name, + dbg(9, "fdnp=%p tdnp=%p from=%s to=%s\n", fdnp, tdnp, fncp->nc_name, tncp->nc_name); if (fdvp->v_mount != tdvp->v_mount) @@ -1008,7 +1006,7 @@ dirfs_nrename(struct vop_nrename_args *ap) */ vp = tncp->nc_vp; if (vp) { - dbg(5, "RENAME2\n"); + dbg(9, "RENAME2\n"); dnp = VP_TO_NODE(vp); cache_unlink(ap->a_tnch); dirfs_node_setpassive(dmp, dnp, 0); @@ -1046,7 +1044,7 @@ dirfs_nmkdir(struct vop_nmkdir_args *ap) int pfd, error; int extrapath; - debug_called(); + dbg(3, "called\n"); extrapath = error = 0; dvp = ap->a_dvp; @@ -1107,7 +1105,7 @@ dirfs_nrmdir(struct vop_nrmdir_args *ap) char *tmp; char *pathfree; - debug_called(); + dbg(3, "called\n"); error = 0; tmp = NULL; @@ -1174,7 +1172,7 @@ dirfs_nsymlink(struct vop_nsymlink_args *ap) char *path; int error; - debug_called(); + dbg(3, "called\n"); error = 0; dvp = ap->a_dvp; @@ -1237,7 +1235,7 @@ dirfs_readdir(struct vop_readdir_args *ap) size_t bufsiz; off_t curoff; - debug_called(); + dbg(3, "called\n"); if (ncookies) debug(1, "ncookies=%d\n", *ncookies); @@ -1268,7 +1266,7 @@ dirfs_readdir(struct vop_readdir_args *ap) dirfs_node_lock(dnp); lseek(dnp->dn_fd, startoff, SEEK_SET); bytes = getdirentries(dnp->dn_fd, buf, bufsiz, &base); - dbg(5, "seek %016jx %016jx %016jx\n", + dbg(9, "seek %016jx %016jx %016jx\n", (intmax_t)startoff, (intmax_t)base, (intmax_t)lseek(dnp->dn_fd, 0, SEEK_CUR)); if (bytes < 0) { @@ -1317,7 +1315,7 @@ dirfs_readlink(struct vop_readlink_args *ap) ssize_t nlen; int error; - debug_called(); + dbg(3, "called\n"); vp = ap->a_vp; @@ -1371,7 +1369,7 @@ dirfs_inactive(struct vop_inactive_args *ap) dirfs_mount_t dmp; dirfs_node_t dnp; - debug_called(); + dbg(3, "called\n"); vp = ap->a_vp; dmp = VFS_TO_DIRFS(vp->v_mount); @@ -1414,7 +1412,7 @@ dirfs_reclaim(struct vop_reclaim_args *ap) dirfs_node_t dnp; dirfs_mount_t dmp; - debug_called(); + dbg(3, "called\n"); vp = ap->a_vp; dnp = VP_TO_NODE(vp); @@ -1429,7 +1427,7 @@ dirfs_reclaim(struct vop_reclaim_args *ap) static int dirfs_mountctl(struct vop_mountctl_args *ap) { - debug_called(); + dbg(3, "called\n"); KTR_LOG(dirfs_unsupported, __func__); @@ -1439,7 +1437,7 @@ dirfs_mountctl(struct vop_mountctl_args *ap) static int dirfs_print(struct vop_print_args *v) { - debug_called(); + dbg(3, "called\n"); KTR_LOG(dirfs_unsupported, __func__); @@ -1449,7 +1447,7 @@ dirfs_print(struct vop_print_args *v) static int __unused dirfs_pathconf(struct vop_pathconf_args *v) { - debug_called(); + dbg(3, "called\n"); return EOPNOTSUPP; } @@ -1457,7 +1455,7 @@ dirfs_pathconf(struct vop_pathconf_args *v) static int dirfs_kqfilter (struct vop_kqfilter_args *ap) { - debug_called(); + dbg(3, "called\n"); KTR_LOG(dirfs_unsupported, __func__);