Augment the UFS filesystem specific print function (called by the
kernel vn_printf() routine when printing out vnodes associated with a UFS filesystem) to also include the inode's link count, effective link count, generation number, owner, group, flags, size, and for UFS2 filesystems, the extent size. Sponsored by: Netflix
This commit is contained in:
parent
a92139d82f
commit
a60a8e90c2
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user