vnode 定義
typedef struct vnode {
kmutex_t v_lock; /* protects vnode fields */
uint_t v_flag; /* vnode flags (see below) */
uint_t v_count; /* reference count */
void *v_data; /* private data for fs */
struct vfs *v_vfsp; /* ptr to containing VFS */
struct stdata *v_stream; /* associated stream */
enum vtype v_type; /* vnode type */
dev_t v_rdev; /* device (VCHR, VBLK) */
/* PRIVATE FIELDS BELOW - DO NOT USE */
struct vfs *v_vfsmountedhere; /* ptr to vfs mounted here */
struct vnodeops *v_op; /* vnode operations */
struct page *v_pages; /* vnode pages list */
struct filock *v_filocks; /* ptr to filock list */
struct shrlocklist *v_shrlocks; /* ptr to shrlock list */
krwlock_t v_nbllock; /* sync for NBMAND locks */
kcondvar_t v_cv; /* synchronize locking */
void *v_locality; /* hook for locality info */
struct fem_head *v_femhead; /* fs monitoring */
char *v_path; /* cached path */
uint_t v_rdcnt; /* open for read count (VREG only) */
uint_t v_wrcnt; /* open for write count (VREG only) */
u_longlong_t v_mmap_read; /* mmap read count */
u_longlong_t v_mmap_write; /* mmap write count */
void *v_mpssdata; /* info for large page mappings */
void *v_fopdata; /* list of file ops event watches */
kmutex_t v_vsd_lock; /* protects v_vsd field */
struct vsd_node *v_vsd; /* vnode specific data */
struct vnode *v_xattrdir; /* unnamed extended attr dir (GFS) */
uint_t v_count_dnlc; /* dnlc reference count */
} vnode_t;
サンプルデータ
# mdb -k
> 0t604::pid2proc |::pfiles -p
FD TYPE VNODE PATH
0 DIR ffffff01cd29a840 /
1 DIR ffffff01cd29a840 /
2 DIR ffffff01cd29a840 /
3 DOOR ffffff01e17bd780 /system/volatile/name_service_door
4 CHR ffffff01e10e4140 /devices/pseudo/sysmsg@0:sysmsg
5 REG ffffff01df742940 /var/adm/messages
6 REG ffffff01dc237940 /var/log/syslog
7 CHR ffffff01e10ac840 /devices/pseudo/log@0:log
8 DOOR ffffff01e1c94b00
> ffffff01df742940::print -a vnode_t
ffffff01df742940 {
ffffff01df742940 v_lock = {
ffffff01df742940 _opaque = [ 0 ]
}
ffffff01df742948 v_flag = 0x10000
ffffff01df74294c v_count = 0x2
ffffff01df742950 v_data = 0xffffff01df740c18
ffffff01df742958 v_vfsp = 0xffffff01cf7121e8
ffffff01df742960 v_stream = 0
ffffff01df742968 v_type = 1 (VREG)
ffffff01df742970 v_rdev = 0xffffffffffffffff
ffffff01df742978 v_vfsmountedhere = 0
ffffff01df742980 v_op = 0xffffff01cd292a80
ffffff01df742988 v_pages = 0
ffffff01df742990 v_filocks = 0
ffffff01df742998 v_shrlocks = 0
ffffff01df7429a0 v_nbllock = {
ffffff01df7429a0 _opaque = [ 0 ]
}
ffffff01df7429a8 v_cv = {
ffffff01df7429a8 _opaque = 0
}
ffffff01df7429aa v_pad = 0xbadd
ffffff01df7429ac v_count_dnlc = 0x1
ffffff01df7429b0 v_locality = 0
ffffff01df7429b8 v_femhead = 0
ffffff01df7429c0 v_path = 0xffffff01e1074be8 "/var/adm/messages"
ffffff01df7429c8 v_rdcnt = 0
ffffff01df7429cc v_wrcnt = 0x1
ffffff01df7429d0 v_mmap_read = 0
ffffff01df7429d8 v_mmap_write = 0
ffffff01df7429e0 v_mpssdata = 0
ffffff01df7429e8 v_fopdata = 0
ffffff01df7429f0 v_vsd_lock = {
ffffff01df7429f0 _opaque = [ 0 ]
}
ffffff01df7429f8 v_vsd = 0
ffffff01df742a00 v_xattrdir = 0
ffffff01df742a08 v_fw = 0xffffff01df742908
}
0 件のコメント:
コメントを投稿