diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 1bd53a78699b..be5cb84a800f 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -134,6 +134,10 @@ struct inode { #define IN_UFS2 0x0400 /* UFS2 vs UFS1 */ +#define PRINT_INODE_FLAGS "\20\20b16\17b15\16b14\15b13" \ + "\14b12\13is_ufs2\12truncated\11ea_lockwait\10ea_locked" \ + "\7lazyaccess\6lazymod\5needsync\4modified\3update\2change\1access" + #define i_dirhash i_un.dirhash #define i_snapblklist i_un.snapblklist #define i_din1 dinode_u.din1 diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 820b093a11cc..490c032649bc 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2338,6 +2338,13 @@ ufs_print(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); + printf("\tnlink=%d, effnlink=%d, size=%jd", ip->i_nlink, + ip->i_effnlink, (intmax_t)ip->i_size); + if (I_IS_UFS2(ip)) + printf(", extsize %d", ip->i_din2->di_extsize); + printf("\n\tgeneration=%jx, uid=%d, gid=%d, flags=0x%b\n", + (uintmax_t)ip->i_gen, ip->i_uid, ip->i_gid, + (u_int)ip->i_flags, PRINT_INODE_FLAGS); printf("\tino %lu, on dev %s", (u_long)ip->i_number, devtoname(ITODEV(ip))); if (vp->v_type == VFIFO)