objset

2012/10/17

objset 定義

struct objset {
        /* Immutable: */
        struct dsl_dataset *os_dsl_dataset;
        spa_t *os_spa;
        arc_buf_t *os_phys_buf;
        objset_phys_t *os_phys;
        /*
         * The following "special" dnodes have no parent and are exempt from
         * dnode_move(), but they root their descendents in this objset using
         * handles anyway, so that all access to dnodes from dbufs consistently
         * uses handles.
         */
        dnode_handle_t os_meta_dnode;
        dnode_handle_t os_userused_dnode;
        dnode_handle_t os_groupused_dnode;
        zilog_t *os_zil;

        /* can change, under dsl_dir's locks: */
        uint8_t os_checksum;
        uint8_t os_compress;
        uint8_t os_copies;
        uint8_t os_dedup_checksum;
        uint8_t os_dedup_verify;
        uint8_t os_logbias;
        uint8_t os_primary_cache;
        uint8_t os_secondary_cache;
        uint8_t os_sync;

        /* no lock needed: */
        struct dmu_tx *os_synctx; /* XXX sketchy */
        blkptr_t *os_rootbp;
        zil_header_t os_zil_header;
        list_t os_synced_dnodes;
        uint64_t os_flags;

        /* Protected by os_obj_lock */
        kmutex_t os_obj_lock;
        uint64_t os_obj_next;

        /* Protected by os_lock */
        kmutex_t os_lock;
        list_t os_dirty_dnodes[TXG_SIZE];
        list_t os_free_dnodes[TXG_SIZE];
        list_t os_dnodes;
        list_t os_downgraded_dbufs;

        /* stuff we store for the user */
        kmutex_t os_user_ptr_lock;
        void *os_user_ptr;

        /* SA layout/attribute registration */
        sa_os_t *os_sa;
};

サンプルデータ

> 0t602::pid2proc |::pfiles -p
FD   TYPE            VNODE PATH
   0  DIR ffffff01cd29a840 /
   1  DIR ffffff01cd29a840 /
   2  DIR ffffff01cd29a840 /
   3 DOOR ffffff01e111a080 /system/volatile/name_service_door
   4  CHR ffffff01e0fc3e80 /devices/pseudo/sysmsg@0:sysmsg
   5  REG ffffff01d9f06b40 /var/adm/messages
   6  REG ffffff01e047d940 /var/log/syslog
   7  CHR ffffff01e0fc3280 /devices/pseudo/log@0:log
   8 DOOR ffffff01ec9a0b00
> ffffff01d9f06b40::print vnode_t v_data
v_data = 0xffffff01d9f05d28
> 0xffffff01d9f05d28::print znode_t z_zfsvfs
z_zfsvfs = 0xffffff01d1e5c080
> 0xffffff01d1e5c080::print zfsvfs_t z_os
z_os = 0xffffff01cf675900
> 0xffffff01cf675900::print objset_t
{
    os_dsl_dataset = 0xffffff01d172b9c0
    os_spa = 0xffffff01cda50000
    os_phys_buf = 0xffffff01d6c47d88
    os_phys = 0xffffff01cf433800
    os_meta_dnode = {
        dnh_rwlock = {
            _opaque = [ 0 ]
        }
        dnh_dnode = 0xffffff01d6c3d658
    }
    os_userused_dnode = {
        dnh_rwlock = {
            _opaque = [ 0 ]
        }
        dnh_dnode = 0xffffff01d6c3d948
    }
    os_groupused_dnode = {
        dnh_rwlock = {
            _opaque = [ 0 ]
        }
        dnh_dnode = 0xffffff01d6c3dc38
    }
    os_zil = 0xffffff01d313e1c0
    os_checksum = 0x7
    os_compress = 0x2
    os_copies = 0x1
    os_dedup_checksum = 0x2
    os_dedup_verify = 0
    os_logbias = 0
    os_primary_cache = 0x2
    os_secondary_cache = 0x2
    os_sync = 0
    os_crypt = 0x2
    os_synctx = 0xffffff01ecaa4960
    os_last_sync = 0x295a
    os_initializing = 0 (B_FALSE)
    os_zil_header = {
        zh_claim_txg = 0
        zh_replay_seq = 0
        zh_log = {
            blk_dva = [
                {
                    dva_word = [ 0x48, 0x102ff63 ]
                },
                {
                    dva_word = [ 0, 0 ]
                },
                {
                    dva_word = [ 0, 0 ]
                },
            ]
            blk_prop = 0x8009090200470047
            blk_pad = [ 0, 0 ]
            blk_phys_birth = 0
            blk_birth = 0x2958
            blk_fill = 0
            blk_cksum = {
                zc_word = [ 0x367aae96ac0e7439, 0xc383ae890100e6d8, 0x3c, 0x4a ]
            }
        }
        zh_claim_blk_seq = 0
        zh_flags = 0
        zh_claim_lr_seq = 0
        zh_pad = [ 0, 0, 0 ]
    }
    os_synced_dnodes = {
        list_size = 0x2f0
        list_offset = 0xb8
        list_head = {
            list_next = 0xffffff01cf675a50
            list_prev = 0xffffff01cf675a50
        }
    }
    os_flags = 0x1
    os_obj_lock = {
        _opaque = [ 0 ]
    }
    os_obj_next = 0x716d
    os_lock = {
        _opaque = [ 0 ]
    }
    os_dirty_dnodes = [
        {
            list_size = 0x2f0
            list_offset = 0x98
            list_head = {
                list_next = 0xffffff01cf675a90
                list_prev = 0xffffff01cf675a90
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xa8
            list_head = {
                list_next = 0xffffff01cf675ab0
                list_prev = 0xffffff01cf675ab0
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xb8
            list_head = {
                list_next = 0xffffff01cf675ad0
                list_prev = 0xffffff01cf675ad0
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xc8
            list_head = {
                list_next = 0xffffff01cf675af0
                list_prev = 0xffffff01cf675af0
            }
        },
    ]
    os_free_dnodes = [
        {
            list_size = 0x2f0
            list_offset = 0x98
            list_head = {
                list_next = 0xffffff01cf675b10
                list_prev = 0xffffff01cf675b10
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xa8
            list_head = {
                list_next = 0xffffff01cf675b30
                list_prev = 0xffffff01cf675b30
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xb8
            list_head = {
                list_next = 0xffffff01cf675b50
                list_prev = 0xffffff01cf675b50
            }
        },
        {
            list_size = 0x2f0
            list_offset = 0xc8
            list_head = {
                list_next = 0xffffff01cf675b70
                list_prev = 0xffffff01cf675b70
            }
        },
    ]
    os_dnodes = {
        list_size = 0x2f0
        list_offset = 0x8
        list_head = {
            list_next = 0xffffff01ee99ecc8
            list_prev = 0xffffff01d6c3d660
        }
    }
    os_downgraded_dbufs = {
        list_size = 0xc8
        list_offset = 0x98
        list_head = {
            list_next = 0xffffff01cf675bb0
            list_prev = 0xffffff01cf675bb0
        }
    }
    os_user_ptr_lock = {
        _opaque = [ 0 ]
    }
    os_user_ptr = 0xffffff01d1e5c080
    os_sa = 0xffffff01d392b510
    os_destroy_nokey = 0 (B_FALSE)
}

0 件のコメント:

コメントを投稿