欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Mutation相關(guān)類有哪些

這篇文章給大家分享的是有關(guān)Mutation相關(guān)類有哪些的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。

在椒江等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站設(shè)計(jì) 網(wǎng)站設(shè)計(jì)制作定制網(wǎng)站開(kāi)發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),全網(wǎng)整合營(yíng)銷推廣,外貿(mào)網(wǎng)站建設(shè),椒江網(wǎng)站建設(shè)費(fèi)用合理。

MutationImpl類說(shuō)明:

struct MutationImpl {
     metareqid_t           reqid;
     __u32                     attempt;
     LogSegment          *ls;                    提交的log片段
     utime_t                   mds_stamp;     mds本地時(shí)間戳
     utime_t                   op_stamp;        客戶端提供的時(shí)間戳
     mds_rank_t            slave_to_mds;     若slave_to_mds>0則說(shuō)明此Mutation是slave發(fā)起的
     set<MDSCacheOjbect *> pins;          mds cache pins
     set<CInode*>         stickydirs;            
     map<MDSCacheObject*, mds_rank_t> remote_auth_pins;     遠(yuǎn)端的auth pins
     set<MDSCacheObject*> auth_pins;                                         本地的auth pins
     list<CInode*> projected_inodes;
     list<CDir*> projected_fnodes;
     list<ScatterLock*> updated_locks;
     list<CInode*> dirty_cow_inodes;
     list<pair<CDentry*, version_t>> dirty_cow_dentries;
};

MutationImpl類方法:

MutationImpl::get_client()

|__若reqid.name.is_client()不為空

     |__說(shuō)明請(qǐng)求是從client發(fā)出的,返回client信息,即:client_t(reqid.name.num())

|__返回-1

MutationImpl::apply()

|__遍歷并清空projected_inodes數(shù)組且每個(gè)數(shù)組成員執(zhí)行pop_and_dirty_projected_inode(ls)函數(shù)

|__遍歷并清空projected_fnodes數(shù)組且每個(gè)數(shù)組成員執(zhí)行pop_and_dirty_projected_fnode(ls)函數(shù)

|__遍歷dirty_cow_inodes數(shù)組

     |__數(shù)組中每個(gè)成員執(zhí)行_mark_dirty(ls)

|__遍歷dirty_cow_dentries數(shù)組

     |__數(shù)組中每個(gè)成員執(zhí)行_mark_dirty(ls)

|__遍歷updated_locks數(shù)組

     |__數(shù)組中每個(gè)成員執(zhí)行mark_dirty()

MutationImpl::cleanup()

|__遍歷auth_pins數(shù)組

     |__數(shù)組中每個(gè)成員執(zhí)行auth_unpin()

|__清空auth_pins數(shù)組

|__遍歷pins數(shù)組

     |__數(shù)組中每個(gè)成員執(zhí)行put()

|__清空pins數(shù)組

MDRequestImpl主要記錄來(lái)自client的請(qǐng)求、slave的請(qǐng)求以及內(nèi)部的操作internal_op。

struct MDRequestImpl: public MutationImpl, public TrackedOp {
   Session *session;                    記錄session信息
   elist<MDRequestImpl*>::item item_session_request;    請(qǐng)求項(xiàng)
   MClientRequest *client_request;            客戶端請(qǐng)求
   vector<CDentry*> dn[2];                保存兩套dentry
   CInode *in[2];                    保存兩套inode
   CDentry *straydn;                    記錄stray的dentry
   snapid_t snapid;                    記錄snap ID信息
   indoeno_t alloc_ino, used_prealloc_ino;        分配的inode號(hào)
   interval_set<inodeno_t> prealloc_inos;        預(yù)分配的inode號(hào)
   int snap_caps;                    snap capability
   int getattr_caps;                    執(zhí)行g(shù)etattr的權(quán)限
   bool did_early_reply;                    
   bool o_trunc;                        請(qǐng)求是一個(gè)O_TRUNC事件
   bool has_completed;                    請(qǐng)求已經(jīng)完成
   bufferlist reply_extra_bl;                在回復(fù)中包含的額外的內(nèi)容
   map<vinodeno_t, ceph_seq_t> cap_releases;        
   MMDSSlaveRequest *slave_request;            slave的請(qǐng)求
   int internal_op;                    內(nèi)部操作
   Context *internal_op_finish;                內(nèi)部操作的回調(diào)函數(shù)
   void *internal_op_private;                內(nèi)部操作的私有對(duì)象
   int retry;                        記錄rety的次數(shù)
   bool waited_for_osdmap;                是否需要等待更新的osmap
   struct More {
     int slave_error;
     set<mds_rank_t> slaves;                發(fā)起slave請(qǐng)求的集合
     set<mds_rank_t> waiting_on_slave;            等待slavereq reply的peer
     set<mds_rank_t> witnessed;    
     CInode *rename_inode;                保存freeze的inode信息
     bool is_freeze_authpin;                保存是否執(zhí)行了freeze authpin操作
     bool is_remote_frozen_authpin;            保存是否執(zhí)行了remote frozen authpin操作
     bool is_ambiguous_auth;                保存是否執(zhí)行了ambiguous auth操作
   }_more;
 };

MDRequestImpl類方法:
MDRequestImpl::~MDRequestImpl()
|__若client_request不為空
  |__執(zhí)行client_request->put()方法,嘗試釋放client_request
|__若slave_request不為空
  |__執(zhí)行slave_request->put()方法,嘗試釋放slave_request
|__刪除_more類對(duì)象

MDRequestImpl::freeze_auth_pin(inode)
|__設(shè)置_more中的rename_inode為inode
|__設(shè)置_more中的is_freeze_authpin為true
|__調(diào)用auth_pin(inode)
|__執(zhí)行inode的freeze_auth_pin()

MDRequestImpl::unfreeze_auth_pin(clear_inode)
|__從_more中的rename_inode得到freeze的inode
|__若inode當(dāng)前是is_frozen_auth_pin()
  |__執(zhí)行inode的unfreeze_auth_pin()來(lái)解除freeze
|__若inode當(dāng)前不是is_frozen_auth_pin()
  |__執(zhí)行inode的unfreeze_inode()
|__設(shè)置_more中的is_freeze_autpin為false
|__若clear_inode==true
  |__設(shè)置_more中的rename_inode為null

MDRequestImpl::set_remote_frozen_auth_pin(inode)
|__設(shè)置_more中的rename_inode為inode
|__設(shè)置_more中的is_remote_frozen_authpin為true

MDRequestImpl::set_ambiguous_auth(inode)
|__執(zhí)行inode的set_ambiguous_auth()函數(shù)
|__設(shè)置_more中的rename_inode為inode
|__設(shè)置_more中的is_ambiguous_auth為true

MDRequestImpl::clear_ambiguous_auth()
|__從_more中的rename_inode得到ambiguous的inode
|__執(zhí)行inode的clear_ambiguous_auth()函數(shù)
|__設(shè)置_more中的is_ambiguous_auth為false

MDRequestImpl::can_auth_pin(object)
|__若object能auth pin或者object在auth_pin或remote auth pin中或者_(dá)more中的is_freeze_authpin為true或者_(dá)more中的rename_inode==object
  |__返回true
|__返回false

MDRequestImpl::drop_local_auth_pins()
|__若_more不為空
  |__調(diào)用unfreeze_auth_pin(true)來(lái)清除freeze的auth pin
|__調(diào)用MutationImpl::drop_local_auth_pins()    來(lái)清除本地的auth pins 

MDRequestImpl::set_filepath(fp)
|__設(shè)置_more中的filepath2為fp

MDRequestImpl::set_filepath3(fp)
|__設(shè)置_more中的filepath3為fp

MDRequestImpl::get_filepath()
|__若client_request不為空
  |__返回client_request->get_filepath()
|__返回_more中的filepath2

MDRequestImpl::get_filepath3()
|__若client_request不為空
  |__返回client_request->get_filepath3()
|__返回_more中的filepath3
 

感謝各位的閱讀!關(guān)于“Mutation相關(guān)類有哪些”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

文章名稱:Mutation相關(guān)類有哪些
本文網(wǎng)址:http://www.chinadenli.net/article38/iigdpp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站外貿(mào)網(wǎng)站建設(shè)電子商務(wù)全網(wǎng)營(yíng)銷推廣網(wǎng)頁(yè)設(shè)計(jì)公司自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)