美文网首页
2021-05-10

2021-05-10

作者: 帆子_8c3a | 来源:发表于2021-05-10 00:54 被阅读0次
server_start_targets
    lustre_start_simple
        do_lcfg //for LCFG_ATTACH
            class_attach
        do_lcfg //for LCFG_SETUP
            class_setup


class_attach
    class_newdev


class_setup
    obd_setup
        lov_setup
            obd_llog_init
                lov_llog_init
                    llog_setup //LLOG_MDS_OST_ORIG_CTXT, lov_mds_ost_orig_logops
                        lov_llog_origin_connect
                            llog_connect
                                llog_origin_connect //send LLOG_ORIGIN_CONNECT RPC
                                    => llog_handle_connect
                    llog_setup //LLOG_SIZE_REPL_CTXT, lov_size_repl_logops
                    //循环调用
                        obd_llog_init
                            osc_llog_init
                                llog_setup //LLOG_MDS_OST_ORIG_CTXT, osc_mds_ost_orig_logops
                                    llog_obd_origin_setup
                                        llog_create
                                        llog_process  
                                llog_setup //LLOG_SIZE_REPL_CTXT, osc_size_repl_logops




mds_finish_transno
    lustre_msg_get_transno
    fsfilt_add_journal_cb
    fsfilt_write_record
    mds_lov_write_objids
    fsfilt_commit

mdc_unlink
    mdc_reint

## XID
oti->oti_xid = req->rq_xid;
    
ptlrpc_prep_req_pool
    request->rq_xid = ptlrpc_next_xid();


## transaction
oti_init

target_send_reply

## replay
struct obd_import
    struct list_head          imp_replay_list;
    struct list_head          imp_sending_list;
    struct list_head          imp_delayed_list;    


ptlrpc_queue_wait
    after_reply
        lustre_msg_set_transno
        ptlrpc_retain_replayable_request
        lustre_msg_get_last_committed

ptlrpc_import_recovery_state_machine
    ptlrpc_replay_next
        ptlrpc_replay_req


## import req 状态机
enum lustre_imp_state {
        LUSTRE_IMP_CLOSED     = 1,
        LUSTRE_IMP_NEW        = 2,
        LUSTRE_IMP_DISCON     = 3,
        LUSTRE_IMP_CONNECTING = 4,
        LUSTRE_IMP_REPLAY     = 5,
        LUSTRE_IMP_REPLAY_LOCKS = 6,
        LUSTRE_IMP_REPLAY_WAIT  = 7,
        LUSTRE_IMP_RECOVER    = 8,
        LUSTRE_IMP_FULL       = 9,
        LUSTRE_IMP_EVICTED    = 10,
};




lop_add : 产生一个cookie
lov_llog_origin_add
mds_llog_origin_add
llog_obd_origin_add



llog_origin_connect
lov_llog_origin_connect



struct obd_trans_info {
        __u64                    oti_transno;
        __u64                    oti_xid;
        __u64                   *oti_objid;
        /* Only used on the server side for tracking acks. */
        struct oti_req_ack_lock {
                struct lustre_handle lock;
                __u32                mode;
        }                        oti_ack_locks[4];
        void                    *oti_handle;
        struct llog_cookie       oti_onecookie;
        struct llog_cookie      *oti_logcookies;
        int                      oti_numcookies;

        /* initial thread handling transaction */
        int                      oti_thread_id;
        __u32                    oti_conn_cnt;
};    


mds_obd_create





llog_lvfs_destroy


ll_unlink_generic
    mdc_unlink
    ll_objects_destroy
        obd_destroy
            lov_destroy
                lov_prep_destroy_set
                obd_destroy
                    osc_destroy
                        => ost_destroy
                            obd_destroy
                                filter_destroy

mds_reint_unlink
    fsfilt_start_log
    vfs_unlink
    mds_log_op_unlink
        obd_unpackmd //lsm =>lmm
        llog_get_context //LLOG_MDS_OST_ORIG_CTXT
        llog_add
            mds_llog_origin_add
                llog_get_context
                llog_add
                    lov_llog_origin_add
                        llog_get_context
                        llog_add
                            llog_obd_origin_add
                                llog_cat_add_rec
                                    llog_cat_current_log
                                    llog_write_rec
    fsfilt_setattr
    mds_finish_transno
    obd_set_info_async
        lov_set_info_async
            obd_set_info_async
                osc_set_info_async
                    => ost_set_info
                        obd_set_info_async
                            filter_set_info_async
                                llog_get_context //LLOG_MDS_OST_REPL_CTXT
                                llog_receptor_accept


llog_setup
    llog_obd_origin_setup
        llog_create
            llog_client_create
    

llog_setup //LLOG_MDS_OST_ORIG_CTXT, lov_mds_ost_orig_logops
llog_setup //LLOG_MDS_OST_REPL_CTXT, filter_mds_ost_repl_logops

llog_obd_origin_setup



llog_connect

llog_repl_connect
    llog_recovery_generic => filter_recov_log_mds_ost_cb
        => log_process_thread
            llog_cat_process => filter_recov_log_mds_ost_cb
                llog_process => llog_cat_process_cb
                    llog_next_block
                    llog_cat_process_cb
                        llog_cat_id2handle
                        llog_process
                    llog_cancel_rec
                        llog_write_rec
            llog_sync

CATLIST

llog_catalog_list
llog_cat_initialize
llog_catinfo_deletions


llog_cat_initialize
    llog_get_cat_list
        fsfilt_read_record
    obd_llog_init
        obd_llog_init
        o_llog_init
    llog_put_cat_list
        fsfilt_write_record


mds_llog_init
    obd_llog_init

mdc_setup
    obd_llog_init

lov_llog_init
    obd_llog_init
        osc_llog_init
            llog_setup


lctl lov_getconfig
jt_obd_lov_getconfig
    OBD_IOC_LOV_GET_CONFIG


lctl llog_catlist
jt_llog_catlist //ioc_dev_list
    OBD_IOC_CATLOGLIST
        llog_catalog_list            
            llog_get_cat_list

jt_llog_info
    OBD_IOC_LLOG_INFO


obd_destroy
    lov_destroy
        obd_destroy
            osc_destroy


llog_write_rec
    llog_lvfs_write_rec
        llog_lvfs_write_blob
            fsfilt_write_record

llog_obd_origin_add
    llog_cat_add_rec
        llog_cat_current_log
            llog_cat_new_log
                llog_create
                    lop_create

相关文章

  • 2021-05-10

    2021-05-10 2021-05-10 2021-05-10 【燃梦行动.阅读】 我是徐新超 ...

  • 872. 叶子相似的树

    2021-05-10 LeetCode每日一题 链接:https://leetcode-cn.com/proble...

  • bitshares比特股数据20210510

    2021-05-10比特股BTS大额转账的记录 时间转出转入BTS数量17:02:33zbbts001zbsend...

  • 2021-05-10 开始录视频课程

    2021-05-10 1、开始确定要录制的视频内容,PS的基础操作 2、找到录制软件EV录屏 2021-06-04...

  • 2022-04-19

    网易 订阅频道 0 王红顺:学校管理的十大思辨 时代教育管理 2021-05-10 08:54 0 人跟帖 王红顺...

  • 形象美学|母女同框--打卡二

    2021-05-10 【美图鉴赏官】宋小羊 我的职业:室内设计师 图一: ️适合场合:日常 刚过完母亲节,看到这样...

  • 一瞬间的控制

    我怎么如此幸运-99将帅挑战赛65-重生247-戴红霞(2021-05-10) 我怎么如此幸运-一瞬间的控制 1....

  • 用半年180天的时间学会英语,剩下179天

    2021-05-10定一个小目标, 1,用半年180天的时间学会英语 目标是不仅学会了英语,也输出了学习英语的心得...

  • 成为宝藏

    2021-05-10 不是说好不在乎数据的吗。为什么我的文章没人看,会这么难过。 觉得自己比不过别人,觉得自己是个...

  • 2021-05-10

    2021-05-10 温湿度系统需求说明书 1.需求概述 1.1项目背景 蒸汽机的发明掀起了人类历史迈向工业的新篇...

网友评论

      本文标题:2021-05-10

      本文链接:https://www.haomeiwen.com/subject/nhdbdltx.html