znode 定義
typedef struct znode {
struct zfsvfs *z_zfsvfs;
vnode_t *z_vnode;
uint64_t z_id; /* この znode の object ID */
kmutex_t z_lock; /* znode modification lock */
krwlock_t z_parent_lock; /* parent lock for directories */
krwlock_t z_name_lock; /* "master" lock for dirent locks */
zfs_dirlock_t *z_dirlocks; /* directory entry lock list */
kmutex_t z_range_lock; /* protects changes to z_range_avl */
avl_tree_t z_range_avl; /* avl tree of file range locks */
uint8_t z_unlinked; /* file has been unlinked */
uint8_t z_atime_dirty; /* atime needs to be synced */
uint8_t z_zn_prefetch; /* Prefetch znodes? */
uint8_t z_moved; /* Has this znode been moved? */
uint_t z_blksz; /* block size in bytes */
uint_t z_seq; /* modification sequence number */
uint64_t z_mapcnt; /* number of pages mapped to file */
uint64_t z_gen; /* generation (cached) */
uint64_t z_size; /* file size (cached) */
uint64_t z_atime[2]; /* atime (cached) */
> uint64_t z_links; /* file links (cached) */
uint64_t z_pflags; /* pflags (cached) */
uint64_t z_uid; /* uid fuid (cached) */
uint64_t z_gid; /* gid fuid (cached) */
mode_t z_mode; /* mode (cached) */
uint32_t z_sync_cnt; /* synchronous open count */
kmutex_t z_acl_lock; /* acl data lock */
zfs_acl_t *z_acl_cached; /* cached acl */
list_node_t z_link_node; /* all znodes in fs link */
sa_handle_t *z_sa_hdl; /* handle to sa data */
boolean_t z_is_sa; /* are we native sa? */
} znode_t;
サンプルデータ
> 0t592::pid2proc |::pfiles -p
FD TYPE VNODE PATH
0 DIR ffffff01cd29a840 /
1 DIR ffffff01cd29a840 /
2 DIR ffffff01cd29a840 /
3 DOOR ffffff01e09f1380 /system/volatile/name_service_door
4 CHR ffffff01e0702600 /devices/pseudo/sysmsg@0:sysmsg
5 REG ffffff01d0d28100 /var/adm/messages
6 REG ffffff01da061b40 /var/log/syslog
7 CHR ffffff01e7964500 /devices/pseudo/log@0:log
8 DOOR ffffff01e7964200
> ffffff01d0d28100::print -a vnode_t v_data
ffffff01d0d28110 v_data = 0xffffff01d1346148
> 0xffffff01d1346148::print znode_t
{
z_zfsvfs = 0xffffff01d2e2e480
z_vnode = 0xffffff01d0d28100
z_id = 0x7258
z_lock = {
_opaque = [ 0 ]
}
z_parent_lock = {
_opaque = [ 0 ]
}
z_name_lock = {
_opaque = [ 0 ]
}
z_dirlocks = 0
z_range_lock = {
_opaque = [ 0 ]
}
z_range_avl = {
avl_root = 0
avl_compar = zfs_range_compare
avl_offset = 0x8
avl_numnodes = 0
avl_size = 0x40
}
z_unlinked = 0
z_atime_dirty = 0
z_zn_prefetch = 0xdd
z_moved = 0
z_blksz = 0x1c800
z_seq = 0x7a473a
z_mapcnt = 0
z_gen = 0x162d
z_size = 0x1c7f9
z_atime = [ 0x5071c579, 0xb409b9 ]
z_mtime = [ 0x507c2a88, 0x2dfebeea ]
z_ctime = [ 0x507c2a88, 0x2dfebeea ]
z_links = 0x1
z_pflags = 0x40800000204
z_uid = 0
z_gid = 0
z_mode = 0x81a4
z_sync_cnt = 0
z_acl_lock = {
_opaque = [ 0 ]
}
z_acl_cached = 0xffffff01df7b85c0
z_link_node = {
list_next = 0xffffff01d0c22108
list_prev = 0xffffff01dfb1aaf0
}
z_sa_hdl = 0xffffff01d11404d0
z_is_sa = 0x1 (B_TRUE)
}
0 件のコメント:
コメントを投稿