linux/fs/dlm/rcom.c
<<
>>
Prefs
   1/******************************************************************************
   2*******************************************************************************
   3**
   4**  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
   5**  Copyright (C) 2005-2008 Red Hat, Inc.  All rights reserved.
   6**
   7**  This copyrighted material is made available to anyone wishing to use,
   8**  modify, copy, or redistribute it subject to the terms and conditions
   9**  of the GNU General Public License v.2.
  10**
  11*******************************************************************************
  12******************************************************************************/
  13
  14#include "dlm_internal.h"
  15#include "lockspace.h"
  16#include "member.h"
  17#include "lowcomms.h"
  18#include "midcomms.h"
  19#include "rcom.h"
  20#include "recover.h"
  21#include "dir.h"
  22#include "config.h"
  23#include "memory.h"
  24#include "lock.h"
  25#include "util.h"
  26
  27static int rcom_response(struct dlm_ls *ls)
  28{
  29        return test_bit(LSFL_RCOM_READY, &ls->ls_flags);
  30}
  31
  32static int create_rcom(struct dlm_ls *ls, int to_nodeid, int type, int len,
  33                       struct dlm_rcom **rc_ret, struct dlm_mhandle **mh_ret)
  34{
  35        struct dlm_rcom *rc;
  36        struct dlm_mhandle *mh;
  37        char *mb;
  38        int mb_len = sizeof(struct dlm_rcom) + len;
  39
  40        mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb);
  41        if (!mh) {
  42                log_print("create_rcom to %d type %d len %d ENOBUFS",
  43                          to_nodeid, type, len);
  44                return -ENOBUFS;
  45        }
  46        memset(mb, 0, mb_len);
  47
  48        rc = (struct dlm_rcom *) mb;
  49
  50        rc->rc_header.h_version = (DLM_HEADER_MAJOR | DLM_HEADER_MINOR);
  51        rc->rc_header.h_lockspace = ls->ls_global_id;
  52        rc->rc_header.h_nodeid = dlm_our_nodeid();
  53        rc->rc_header.h_length = mb_len;
  54        rc->rc_header.h_cmd = DLM_RCOM;
  55
  56        rc->rc_type = type;
  57
  58        spin_lock(&ls->ls_recover_lock);
  59        rc->rc_seq = ls->ls_recover_seq;
  60        spin_unlock(&ls->ls_recover_lock);
  61
  62        *mh_ret = mh;
  63        *rc_ret = rc;
  64        return 0;
  65}
  66
  67static void send_rcom(struct dlm_ls *ls, struct dlm_mhandle *mh,
  68                      struct dlm_rcom *rc)
  69{
  70        dlm_rcom_out(rc);
  71        dlm_lowcomms_commit_buffer(mh);
  72}
  73
  74static void set_rcom_status(struct dlm_ls *ls, struct rcom_status *rs,
  75                            uint32_t flags)
  76{
  77        rs->rs_flags = cpu_to_le32(flags);
  78}
  79
  80/* When replying to a status request, a node also sends back its
  81   configuration values.  The requesting node then checks that the remote
  82   node is configured the same way as itself. */
  83
  84static void set_rcom_config(struct dlm_ls *ls, struct rcom_config *rf,
  85                            uint32_t num_slots)
  86{
  87        rf->rf_lvblen = cpu_to_le32(ls->ls_lvblen);
  88        rf->rf_lsflags = cpu_to_le32(ls->ls_exflags);
  89
  90        rf->rf_our_slot = cpu_to_le16(ls->ls_slot);
  91        rf->rf_num_slots = cpu_to_le16(num_slots);
  92        rf->rf_generation =  cpu_to_le32(ls->ls_generation);
  93}
  94
  95static int check_rcom_config(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid)
  96{
  97        struct rcom_config *rf = (struct rcom_config *) rc->rc_buf;
  98
  99        if ((rc->rc_header.h_version & 0xFFFF0000) != DLM_HEADER_MAJOR) {
 100                log_error(ls, "version mismatch: %x nodeid %d: %x",
 101                          DLM_HEADER_MAJOR | DLM_HEADER_MINOR, nodeid,
 102                          rc->rc_header.h_version);
 103                return -EPROTO;
 104        }
 105
 106        if (le32_to_cpu(rf->rf_lvblen) != ls->ls_lvblen ||
 107            le32_to_cpu(rf->rf_lsflags) != ls->ls_exflags) {
 108                log_error(ls, "config mismatch: %d,%x nodeid %d: %d,%x",
 109                          ls->ls_lvblen, ls->ls_exflags, nodeid,
 110                          le32_to_cpu(rf->rf_lvblen),
 111                          le32_to_cpu(rf->rf_lsflags));
 112                return -EPROTO;
 113        }
 114        return 0;
 115}
 116
 117static void allow_sync_reply(struct dlm_ls *ls, uint64_t *new_seq)
 118{
 119        spin_lock(&ls->ls_rcom_spin);
 120        *new_seq = ++ls->ls_rcom_seq;
 121        set_bit(LSFL_RCOM_WAIT, &ls->ls_flags);
 122        spin_unlock(&ls->ls_rcom_spin);
 123}
 124
 125static void disallow_sync_reply(struct dlm_ls *ls)
 126{
 127        spin_lock(&ls->ls_rcom_spin);
 128        clear_bit(LSFL_RCOM_WAIT, &ls->ls_flags);
 129        clear_bit(LSFL_RCOM_READY, &ls->ls_flags);
 130        spin_unlock(&ls->ls_rcom_spin);
 131}
 132
 133/*
 134 * low nodeid gathers one slot value at a time from each node.
 135 * it sets need_slots=0, and saves rf_our_slot returned from each
 136 * rcom_config.
 137 *
 138 * other nodes gather all slot values at once from the low nodeid.
 139 * they set need_slots=1, and ignore the rf_our_slot returned from each
 140 * rcom_config.  they use the rf_num_slots returned from the low
 141 * node's rcom_config.
 142 */
 143
 144int dlm_rcom_status(struct dlm_ls *ls, int nodeid, uint32_t status_flags)
 145{
 146        struct dlm_rcom *rc;
 147        struct dlm_mhandle *mh;
 148        int error = 0;
 149
 150        ls->ls_recover_nodeid = nodeid;
 151
 152        if (nodeid == dlm_our_nodeid()) {
 153                rc = ls->ls_recover_buf;
 154                rc->rc_result = dlm_recover_status(ls);
 155                goto out;
 156        }
 157
 158        error = create_rcom(ls, nodeid, DLM_RCOM_STATUS,
 159                            sizeof(struct rcom_status), &rc, &mh);
 160        if (error)
 161                goto out;
 162
 163        set_rcom_status(ls, (struct rcom_status *)rc->rc_buf, status_flags);
 164
 165        allow_sync_reply(ls, &rc->rc_id);
 166        memset(ls->ls_recover_buf, 0, dlm_config.ci_buffer_size);
 167
 168        send_rcom(ls, mh, rc);
 169
 170        error = dlm_wait_function(ls, &rcom_response);
 171        disallow_sync_reply(ls);
 172        if (error)
 173                goto out;
 174
 175        rc = ls->ls_recover_buf;
 176
 177        if (rc->rc_result == -ESRCH) {
 178                /*we ;

 179                log_debug(ls, "remote node %d not ready", nodeid);
 180                rc->rc_result = 0;
 181                error = 0;
 182        } else {
 183                error = check_rcom_config(ls, rc, nodeid);
 184        }
 185
 186        /*wthe caller looks at rc_result for the remote recovery status */
 187 out:
 188        return error;
 189}
 190
 191static void receive_rcom_status(struct dlm_ls *ls, struct dlm_rcom *rc_in)
 192{
 193        struct dlm_rcom *rc;
 194        struct dlm_mhandle *mh;
 195        struct rcom_status *rs;
 196        uint32_t status;
 197        int nodeid = rc_in->rc_header.h_nodeid;
 198        int len = sizeof(struct rcom_config);
 199        int num_slots = 0;
 200        int error;
 201
 202        if (!dlm_slots_version(&rc_in->rc_headered from each
rc->rc-> 103     2     20ef="+code=ls_recover_"+code=error" class=do_ss="lilass="line" nam2o_ss="li;
        }
2s20fs/dlm/rcom.c#L76" id="L76" class="line" name="L76"="L97">  97        struct <="+code=set_rcom_status" class="sref">set_rcom_status 202        if (!rcom_con2ls2/a>-&20f">rc->"config 2ismat20"fs/dlm/rcom.c#L9!d="L176" class="llass="line" name="L76">  76{
{
(dlm_slots_version(&ls_2xflags, rc_headered from each
rc->rc->(rf2/a>-&2t; 112     2     21line" name="L142"> 142EP2OTO;
  57
  58        spin_lock(&        2
rc_headered from each
  59        rcrc_headered ="sref">rcr;
rcom_status *rcom_config);
  59        rcom_config="ss="sref">;
 115}
ls_recover_seq;
  60        spin_unlock(&uin21m/rcom.c#L167" id="L167" claclass="sref">h_nodeid;+50        rcom_config);
DLM_RCOM_STATUS,
spin_unlock(&new_seq)
mh, lsls2/a>-&2t; 157
 158        error = create_r_REPL9" class="line" "sref">create_r_REPL9e=cres */
ls<22MINOR, h_nodeid"line" name="L159"> 159                            sizeof(struct rcom_st2href="+co2e=ls" class="sref">lsls);
l2_rcom_spin);
rcom_st2h        2="L123"> 123}
(str2ct   55
 197  llow_sync_reply(rcom_st2h ls)
ls_recover_lock);
 197  dlm/rcom.c#L59" id="L59" claatus" class="sref">rcom_st2h href="+2e=ls" class="sref">lsls_recover_buf;
 154   .c#L196" id="L196" class="line" name="L196"> 196     2&ls<22ss="sref">mh, ls<2a>->  83
 158          97        struct ls_recover_buf;
rf_num_slots = ls        int l2_rcom_spin);
  85                             131}
 196     2href="fs/2lm/rcom.c#L133" id="L1332 clas23            goto  * 2ow no23m/rcom.c#L174" id="L174" clarclass="line" name="L57">  57
  58        spin_lock(& * it 2ets n23m/rcom.c#L105" id="L105" class="l">  59        rcom_config="ss="sref">;
le32_toclass="line" name="L85">  85      slots_version(&ls_recover_seq;
  60        spin_unlock(&
 179            fs/dlm/rcom.c#L19 a href="fsf="+codcodf="+cols,28 * othe2 node23: %d,%x nodeid %d: %d,%x&qclass="line" name="L85">  85     9                          s="sref">rcom_config="ss="sref">;
(& * they set 2eed_s24;, nodeid);
 180               2140 * rc2m_con24;  83
 158          97        struct ls_recover_buf;
(& 1242MINOR,  196     href="fs/2lm/rcom.c#L142" id="L1422 clas24    return - */
uint32_t  69 158        send_rcom()
ls_recover_seq;
  60        spin_unlock(&dlmde=error" class=2o_67
 12824m/rcom.c#L118" id="L118" classs="line" name="L167"> 167
 168        send_rcom(error = 0;
ls_r2cover2nodeid = nodeid;
rcom_response);
rcom_rea hred="L191" class="line" name="L191"> 191static void receive_rcom_status(struct dlm_ls *ls, st2odeid" cl2ss="sref">nodeid == 2a hre2="+codslots_version(&ls-2gt;  57
  58 c  spin_unlock(&<2code=dlm_2ecover_status" class="sr2f">dl2_recover_statu1" id="L201" class="tesclass="sref">ls_rcomtesclassa href="fs/dlm/rcom.c#L128" id="L128" class="line" name="L128"> 128        clear_bit(rf_lvblen)2L155" cla2s="line" name="L155"> 152 2              f="+code=nodeid" clasL197" id="L197" class="line" name="L197"> 197  llow_sync_reply(le32_to_cpu(rf(&
 179           jec=log_refsf="+com.c#Lsf="+co_seLsf="+llx expec=lsf="+llxols,ame="L1562> 156        }
 197 typ=dlm_wait_function typ= 197        int nodeid = ls,aL148" cl2 class="sref">nodeid2 set_rcom_status 202        if (!ls,atus)2 &, rfspin_unlock(&<2 id="L1602 class="line" name="L1602> 1602/a>        if (error)
 162 26t;out;
);
 166         202    ref="+code=send_rcoL197" id="L197" class="line" name="L197"> 197        int nodeilengt"> 168      eilengt"q" c ef">spin_unlock(&<2 f="+code2_buf" class="sref">rc_bu2,26#L113" id="L11eader" class="s class="sref">ls_rcom_seq;
 129        clear_bit(LSFL_RCOM_READY2ss="sref"2status_flags);
ls_rcom_spin);
 128        clear_bit(LSFL_RCOM_WAIT2s, &a2p;rc->
  58 nameto_le3l"+code=LSFL_RCOM_W nameto_le3lclass="sref">LSFL_RCOM_WAIT2sss="sref2lass="sref">dlm_config.
c2_buffer_size);
ls_flags);
 130        spin_unlock(&<2class="sr2f">ls, rc);
ls, 2amp;<2 href=om.c#L143" id="L143" class="s 143
 191static void dlm_rcom_status(struct dlm_rcosasclaclass="sref">h_nodasclaclde=ls" class="sref">ls, st2de=disall2w_sync_reply" class="sre2">dis27dlm_rcom * 192{
 193    2L173" cla2s="line" name="L173"> 172 27sref">dlm_rcom *rc;
 194        st2e=out" cl2ss="sref">out;
mh;
ls-2gt;2s_recover_buf;
 149
 150        ls->rc->/*we27m/rcom.c#L118" id="L118" cla"ss="line" name="L157"> 157
 158        error = cNAME_rcom(h_nodasclaclde=l>"line" name="L159"> 159                            sizeof(struct rcom_stng">"2remote node %d not r2ady&q28sref">rc, &mh);
r2-2gt;error)
 181    2           );
ls_recover_buf;
dlm_rcosasclaclass="sref">h_nodasclaclde=lsf="fs/dlm/rcom.c#L161" id=21id="L17220;
 142ls,  164
 165        allow_sync_reply(2"sref">no2eid);
rc_id);
 166        memset(ls->ls_recover_bref="+code=ls" class="sref">2"f="+code2> 184        }
/*wthe2calle281/rcom.c#L126" id="L126" classs="line" name="L167"> 167
 168        send_rcom(rc-> 288 157
 170        error = dlm_wait_function(error;
rcom_response);
 171         189}
 out:
rc_in)
 14   fs/dlm/rcos 191static void receive_rcom_status(struct dlm_ls *ls, st2uct dlm_ls *dlm_rcom * 192{
 193    2href="+co2e=rc_header" class="sref2>rc_h2ader. *rc;
 194        st2=len" cla2s="sref">len = sizeo2(stru2t out:
h_noinaclh_noeryaclode=error" class="sref">error =  194        st3lass="lin3" name="L199"> 199  3     30m/rcom.c#L189" id="L189" class3 id="L2003 class="line" name="L2003> 20030t;status;
 197        int nodeid = rc_in->error;
h_noinacl 197        int nodeilengt"> 168      eilengt"q" c -*sref">DLM_RCOM_STATUS,
 192{
rc_3n30lm/rcom.c#L162" id="L162" cleryaclass="sref">h_noeryaclode=a>
ls->ls_recover_br -*sref">DLM_RCOM_STATUS,
 192{
 157
 158        error = cNAME_r_REPL9" class="line" "sref">cNAME_r_REPLh_noeryaclode=erline" name="L159"> 159                            sizeof(struct rcom_s32me="L10432 104        }
mh);
rcom_s32l32/a>-30a href="+code=ls_rcom_spin" cf">ls_recover_buf;
 197  llow_sync_reply(rcom_s32"config32isma30m/rcom.c#L118" id="L118" claslass="sref">ls_recover_lock);
 197  dlm/rcom.c#L59" id="L59" claatus" class="sref">rcom_s3rhref="+c32e=ls_exflags" class="sr32">ls31m/rcom.c#L189" id="L189" class32a>( 143 158         202        if (!h_noinaclls_recover_buf;
h_noeryaclode=em.c#L189" id="L189" class32or" clas32code=rf" class="sref">r32/a>-312MINOR, status;
rcom_s32s="line"32ame="L112"> 112    32    31lm/rcom.c#L162" id="L162" clsss="line" name="L167"> 167
 168        send_rcom(E32OTO;
       32
rc_heade32       return 0;
rcom.c#L143" id="L143" cl167
<_"> 1up"+code=LSFL_RCO" cl167
<_"> 1upa hred="L191" class="line" namersb"L192"> 192{
a href="fs/dlm/rcom.c#L1603 <  115}
dlm_ls *ui31der. * 192{
 193    32aspan cl32ef">new_seq)
. *rc;
 194        st32href="+c32e=ls" class="sref">ls. * 191static void  191smes ="name="L194"> 194        st32a>(l32/a>-32t;num_slots = 0;
ls32             goto ls 157
 158        reate_rcom" class="sref">cLOOKUP9" class="line" "sref">cLOOKUP 168      mes =engt"ode=em.c#L189" id="L189" class32="sref">32_rcom_spin);
 159                            sizeof(struct rcom_s32h       32="L123"> 123}
mh);
error)
ls)
);
ls_recover_buf;
 168      mes =engt"ode=status" class="sref">rcom_s32a href="32e=ls" class="sref">lsls_recover_buf;
ls322ss="sref">mh, ls32a>-> 167
 168        send_rcom(ls
32_rcom_spin);
 out:
 131}
 134 *32ow n323m/rcom.c#L143" id="L143" cl167
<_"> 1up_dump"+code=LSFL_RCO" cl167
<_"> 1up_dumpa hred="L191" class="line" namersb"L192"> 192{
 * it32ets 33="sref">dlm_ls *dlm_rcom * 192{
 193    32href="fs32lm/rcom.c#L137" id="L1332 cla33der. *rc;
 194        st328 * oth32 nod339er. * 191static void  191smes ="name="L194"> 194        st32 * they set32eed_34t num_slots = 0;
 * r32m_co34odeid =  134           157
 158        cLOOKUP9" class="line" "sref">cLOOKUP 168      mes =engt"ode=em.c#L189" id="L189" class3href="fs/3lm/rcom.c#L142" id="L1423 clas34    return -<_recoverrrrrrrrrrrrrline" name="L159"> 159                            sizeof(struct rcom_s3n class="3omment"> */
mh);
uint33_terror)
)
ls_recover_buf;
 168      mes =engt"ode=status" class="sref">rcom_s3   struct3ls_recover_lock);
rcom_s3 href="fs3f="+code=dlm_mhandle" cl3ss="s340f">rc-> 13834m/rcom.c#L118" id="L118" classs="line" name="L167"> 167
 168        send_rcom(error = 0;

ls_r3cover35t;out:
nodeid;
nodeid == 3a hre351line" name="L142"> 142ls-3gt; 1up"+code=LSFL_RCO   fs/dlm/rco"> 1upa hred="L191" class="line" name="L191"> 191static void receive_rcom_status(struct dlm_ls *ls, st3code=dlm_3ecover_status" class="sr3f">dl3_recovf">dlm_ls * 153 3              m * 192{
 193    3ass="sref3>out;
dlm_rcom *rc;
 194        st3ame="L1563> 156        }
out:
status;
 197        int nodeid = rc_in->nodeid3 h_nodeid;
f="fs/dlm/rcom.c#L197" id="L197" class="line" name="L197"> 197        int nodeilengt"> 168      eilengt"q" c -*sref">DLM_RCOM_STATUS,
 192{
)3 & 157
 158        error = cLOOKUPr_REPL9" class="line" "sref">cLOOKUPr_REPLde=cre0erline" name="L159"> 159                            sizeof(struct rcom_s3L161" cla3s="line" name="L161"> 163 36t;mh);
out;
rcom_s3 f="+code3_buf" class="sref">rc_bu3,363            goto );
 197  llow_sync_reply((&, &a3p; 158 og_e=mh" class="sref">m og_e=mh"name="L158"> 158         179            fs/dlm/rco"> 1up dumpom.c#Lsf="+costatus;
rcom_s3sss="sref3lass="sref">dlm_config. 158         202        if (!h_nodeidrcom_s3sme="L1563_buffer_size);
 rcom_s3 L148" cl3f">ls, rc);
ls, 3amp;<37t; 157
 1up"+code=LSFL_RCO" cleast na"> 1upname="L158"> 158        error =  202        if (!h_nodeiddis372MINOR, rcom_s3 id="L1723 class="line" name="L1723> 1723/a>        if 1" id="L105" class=e=mh" class="sref">mh);
 173 372ef="+code=ls_recover    sizeof(struout:
out;
ls_recover_buf;
 154  , &a3ls" class="sref">ls-3gt;  55
 197  llow_sync_reply(rcom_s3s="sref">3s_recover_buf;
ls_recover_lock);
 197  dlm/rcom.c#L59" id="L59" claatus" class="sref">rcom_s3href="+co3e=rc_result" class="sref3>rc_r370f">rc->/*we37m/rcom.c#L118" id="L118" classs="line" name="L167"> 167
 168        send_rcom("3remote node %d not r3ady&q38lm/rca href="+code=EPROTO" clas3 r3-38odeid =  181    38lm/rcom.c#L190" id="L190" class="line" na>
<_"> 1up_om_response);

<_"> 1up_om_rea hred="L191" class="line" name="L191"> 191static void receive_rcom_status(struct dlm_ls *ls, st31id="L17230;
(&ls, );
 158         202    rcom();
, &a3> 184        }
/*wthe3calle381/rcoom.c#L190" id="L190" class=packna>
<_">="sref">ls_flags
<_">="a hred="L191" class="line" namersb"L192"> 192{
 192{
 192=kbvoidem.c#L189" id="L189" class3lm/rcom.c3L187" id="L187" class="l3ne" n383;
<_">="sref">ls_flags
<_">="a hrs/dlm/rcom.c#L193"l"+code=LSFL_RCOrlde=ls" class="sref">ls, st31        3ass="line" name="L188"> 388(&error;
rc_id);
D/dlm/rcom.c#L193"l"+code=LSFL_RCOrlde=lsrcom( 189}
 197
 158 kb"L192"> 192=kbvoid class="line" name="Lkb_ownp llow_sync_reply(rc_in)
 197
 158 kb"L192"> 192=kbvoid class="line" name="Lkb_ llow_sync_reply(ls 197
 158 kb"L192"> 192=kbvoid class="line" name="Lkb_exhref="+code=LSFL_RCOLkb_exhref=    rcom( 197
 158 kb"L192"> 192=kbvoid class="line" name="Lkb_href="+code=LSFL_RCOLkb_href=    rcom(, &a3f="+code=rcom_status" cl3ss="s392"fs/dlm/rcom.c#L55" id="L55"l"+code=LSFL_RCOrlde=l" name="L197"> 197
 158 kb"L192"> 192=kbvoid class="line" name="Lkb_lvb dlm/rcom.c#L59" iLkb_lvb dl    rcom( 197
 192=kbvoid class="line" name="Lkb_rqm97rcom_s3href="+co3e=rc_header" class="sref3>rc_h39a href="+code=ls_rcom_spin" cl"+code=LSFL_RCOrlde=l" name="L197"> 197
 192=kbvoid class="line" name="Lkb_grm97rcom_s3h        3s="sref">len = sizeo3(stru39m/rcom.c#L118" id="L118" clasl"+code=LSFL_RCOrlde=l" name="L197"> 197
 192=kbvoid class="line" name="Lkb_m.c#L1m/rcom.c#L59" iLkb_m.c#L1" claatus" class="sref">rcom_s4lass="lin4" name="L199"> 199  4     40a>-> 197
rc="L158"> 158 kb"L192"> 192=kbvoid class="line" name="Lkb_ nametyp=dlm_wait_functiLkb_ nametyp=    rcom(error;
 192=kbvoid class="line" name="Lkb_bastflass="sref">h_nodkb_bastflde=ls" class="sref">ls, st4ref="+cod4=rc_in" class="sref">rc_4n40    return -<_recoverf="+code=ls_flasl"+code=LSFL_RCOrlde=l" name="L197"> 197
rcom_s4l4f="+cod4=a href="+code=dlm_rcom"42    402ef="+code=ls1" id="L105" class= kb"L192"> 192=kbvoid class="line" name="Lkb_astflass="sref">h_nodkb_astflde=ls" class="sref">ls, st4r5f="+cod4=="+code=dlm_mhandle" cl42rcom403m/rcom.c#L17f="+++++f="+code=ls_flasl"+code=LSFL_RCOrlde=l" name="L197"> 197
rcom_s4l6f="+cod4=="+code=rcom_status" cl42="fs40ref="+code=ls_recover_buf" cla42=  197h_noal_="sr cl57
rc="L158"> 158cm" class="sref"> 168      mes =engt"ode=status" class="sref">rcom_s42l42/a>-40a href="+code=ls_rcom_spin" memcpesponse);
 197h_noal_="srode=error" class="sre 168      mes =engt"ode=status" class="sref">rcom_s42"config42isma402ss="sref">mh, ls41a>-> 17refment">/* FIXME: might we have "L1lvb without  "srLKF_VALBLK set ?ef="+cosref">mh,  17refment">L17f="+++++If so, "line" na>
<_">ck_args() won't take this repy. */ef="+cosref">mh, r42/a>-41             goto  112    42    41a>        if 1" id="L105" class= kb"L192"> 192=kbvoid class="line" name="Lkb_lvbpt" class="sref">m kb_lvbpt"de=ls" class="sref">ls, st42"sref">E42OTO;
);
 197 192=kbvoid class="line" name="Lkb_lvbpt" class="sref">m kb_lvbpt"de=lref="+code=send_rcm" class="sref"> 191smes ="name class="line" name="L16lvb class="sref">h_nod16lvb clode=status" class="sref">rcom_s42>       42
rc_heade42       return 0;
 115}

<_">="sref">ls_flags<" cl167
<_">="a hred="L191" class="line" namersb"L192"> 192{
 192{
 192=kbvoids" class="sref">ls, st42ui41der(&new_seq)
. * 191static void  191smes ="name="L194"> 194        st42href="+c42e=ls" class="sref">ls. * 192{
 193    42a>(l42/a>-42t;rc;
 194        st42ls422;
<_">="sref">ls_flags
<_">="a hrs/dlm/rcom.c#L193"l"+code=LSFL_RCOrlde=l="L194"> 194        st42s="line"42e=ls" class="sref">lsout:
h_nodeid;
sref">DLM_RCOM_STATUS,

<_">="sref">ls_flags
<_">="a hrstatus" class="sref">rcom_s42="sref">42_rcom_spin);
 123}
 192=kbvoid class="line" name="Lkb_lvbpt" class="sref">m kb_lvbpt"de=ls" class="sref">ls, st42y(st42ct h_nodeid+>
h_nod16lvb clode=tatus" class="sref">rcom_s42< ls)
rcom_s42ls 157
 158        cLOCK28" class="line "sref">cLOCKh_nodeid 159                            sizeof(struct rcom_s42aspan cl42ef="+code=ls" class="sr42">ls429ecover_statu1" id="L105" class=e=mh" class="sref">mh);
ls42a>->error)
ls = 42_rcom_spin);
 *="sref">ls_flags
<_">="a hrs/)ef="+code=send_rcf">ls_recover_buf;
 131}

<_">="sref">ls_flags
<_">="a hredlm/rcom.c#L193"m" class="sref"> 192=kbvoiderror" class="sre42lm/rcom.c#L133" id="L1342 cla43#L113" id="L11eader" class=""f">ls_recover_buf;
 *42ow n432        if (! * it42ets 432"fs/dlm/rcom.c#L55" id="L55sss="line" name="L167"> 167
 168        send_rcom(de=error" class="sref">error)

out:
 * oth42 nod439er * they se4 the 44" id="L143"i id="L152" class="f">h_nodeid ** needs at least "fs/dlm/ +  hredlm/rsref">mh,  134  4     44L190" id="L190" class="line" na>
<_"> 1up_om_re_flags
<_">="a <_"> 1up_om_re_f91" class="line" namersb"L192">91static void receive_rcom_status(struct dlm_ls *ls, st31id="L1724lm/rcom.c4L142" id="L1423 clas34  4 retu44_version(&ls 4/
 192{
 193    42a>(uint33_trc;
 194        st42)
out:
status;
 197        int nodeid = rc_in->rcom_s42{
 158         202    rcom( 13834m/4com.c44>mh, error4/a> = 0;
 157
 158         = cLOOKUPr_REPLCKlass="line" "sref">cLOOKUPr_REPLCKlass="rcom"a>, ls_r3cover35t;4a hre4="+c ,

<_">="sref">ls_flags
<_">="a hrstatus" clame="L159"> 159                            sizeof(struct rcom_s42aspan cl4"sref">no4eid;
mh);
 == 3a hre351l4ne" n45 -<_recover_/a> rcom_s3 f="+code4ls" class4"sref">ls-3gt;dl3_re4ovf">45L164" id="L164href="+code=a
67">* We  hre b>=" the  dl3  hredlm/rsATUS
<_">ckd, b*/mh,  153 3   4     4    m< 17refment">L17f="+++++If so, "li"fs/dt naom_rename=="+c() has fill="+in 7mh, out;4dl45 class="sref">rcom_s42 1564       }
);
;
 202        if (!,

<_">="sref">ls_flags
<_">="a hrstatus" claass="sref">rcom_s42aspan cl4"s="line"4ef">nodeid3 ls_recover_lock);
 197  llow_sync_reply(rcom_s3s="sref">4 &ls_recover_lock);
 197  dlm/rcom.c#L59" id="L59" claatus" class="sref">rcom_s3href="+co4 class="l4ne" name="L1603> 16036t;4a hre46= 4s="line" 4ame="L161"> 163 36t;4a hre46 167
 168        send_rcom(;
rc_bu3,363 4     4    goto );
* If the atushrece doeske this exist thensATill  hre a aatus" messagef">mh, L17f="+++++Ifb>="; ite this possibly. *at it just "oeske this b witits globalus" yetosref">mh, dlm_config.rcom_s42);

<_">="sl
{
="sl
 = (struct dlm_ls *ls, st31id="L1724f">ls4 (&);
 192{
 193    42a>(ls, 3amp;<37t;4a hre47"+cm *
<_">="a hrstconfigrcom.c#L193" id="L193"f="+code=rcom_cor/dlm/rcom.c#L161" id=42s="line"4w_sync_re4ly" class="sre3">dis372M4NOR *="s"sref">rc;
 194        st42=kbvoiderrmb"> 194        st42 173 372e4="+co4e=ls_recover   id="L143" cl167h_nodeid,
 192{
="sref">configlags
<_">="a hrstconfigrcoma href="+code=ls"4rrcom.c#L4ss="sref"4out;
ls-3gt; 1="fs/dlma hreast na"> low17f=s_getf="+fhref="+code=nodeia"> low17f=s_getf="+fhr/dlm/rcom.c#L168" ida> = cLmb_ef">h_nodeidcLGFP_NOFS>h_nodeid=kbvoiderrmb"> 1a href="+code=ls"4rrcom.c#L4sass="sre4buf;
 h_nodeid 194        st42ls4class="comment3>/*we37m/4com.c4L118" id="L118" classs="line"ss="sref">rc_id);
=kbvoiderrmb"> 1>D/dlclass="sref">cLmb_ef">h_nodeidh_nodeid<+code=rc"4class="sref">r3-38od4id
<_">="s192"> 192{
=kbvoiderrmb"> 194        st42 181    38lm4rcom.48   goto ls_recover_lock);
nodeid = h_nodeidcLOOKUHEAD     JO"line" "srLUr_RCOVERHEAD     JO"="L1*| class="sref">cLOOKUHEAD    INO"line" "srLUr_RCOVERHEAD    INO"fs/da href="+code=ls"4rrcom.c#L4rbuf" cla4="+code=rc" cl3ss="s38#L413" i4="L11eader" class="f="+code=mS">ls_recover_lock);
nodeid = h_nodeid 197        int nodeid = h_nodeidls_recover_buf;
nodeid = ="fs/dlma hreast na"> ou class="line" iname="L15"> ou class="ef="fa href="+code=ls"4rrcom.c#L4rs" class4       }
  55
nodeilengt"> 168      eilengt"q" c -*sref">DL"fs/dlma hreast nmb_ef">h_nodeid/*wthe3calle381/4coom.48126" id="L126" claslass="sref">ls_recover_lock);
nodeilengt"> 16cm="+code=rc_in" clacm=f">DL"fs/dlma hreast nOOKUPr_Rline" "sref">cLOOKUPr_Rfs/d href="+code=ls"4rrcom.c#L4rbuffer_s4L187" class="l3ne" n383;4a hre48-> 388ls_recover_lock);
cLOOKUPr_RESTATUSlass="fs/d href="+code=ls"4rrcom.c#L4"sref">er4or;
ls_recover_lock);
 197  llow_sync_reply(rcom_s3s="sref">4e="L189">4189}
);
 197  dlm/rcom.c#L59" id="L59" claatus" class="sref">rcom_s3href="+co4f="+code=4lm_rcom" class3"sref39  4     4 ;
 154<-(struct h_nodeidrcom_s3href="+co4f;
)
 142="sref">configlags
<_">="a hrstconfigrcom.c=send_rcf">ls_recover_buf;
h_nod16lvb clo 15~0Ua href="+code=ls"4rrcom.c#L4f="+code=4com_status" cl3ss="s392"4s/dlm49=ls_recover_buf" cla4 < )
send_rcom( low17f=s_17f=itf="+fhref="+code=nodeia"> low17f=s_17f=itf="+fhref="fs/dlm"l"+code=L="+code=rcom_status" class="sref">rcom_s42aspan cl4s="sref">4en = sizeo3(stru39m/4com.c49>mh,  199  4     40a>5><5 href="+code=ls" cla 0ss="sref">rcom_s42aspan cl5 class="l5ne" name="L2004> 20040od5ide5ror;
rc_4n40  5 retu5n -<_r4href="+code=a
67">*f">mh, L17f="+++++* Ignore messages for aatge Y before we  h/mh, mh, L17f="+++++*f">mh, mh, L17f="+++++*f">mh,  = sizeo3(stru39m/5="sre5">mh
67"+* "fs/dt naom_rembers()f">mh, ls41a>5><5 hrefe4href="+code=a
67"+* -  hre nothingf">mh,  17refment">L17f="+++++* - dt v nothingf">mh, e5class="sref">r42/a>-41  5     5    go 17refment">L17f="+++++* - ignore NAMES, NAMESlass="fs>mh,  112    42    41a>5     51 -<_r4href="+code=a
67"+* - ignore PLde=c, PLde=cre0erlin>mh, L17f="+++++* - ignore PLCK, PLCKlass="rc>mh, mh, L17f="+++++* dt naom_aatus" |= NODESrc>mh, }
mh, ui41de5L17f="+++++* "fs/dt naom_rembers    r()f">mh, )
.51>mh
67"+*f">mh, ls.52hrefe4href="+code=a
67"+* "fs/dt naom_didt tory()f">mh, l42/a>-42t;5a hre52179"> 17refment">L17f="+++++* -  hre NAMESf">mh, e5=ls" class="sr42">ls422;5a hre52   go 17refment">L17f="+++++* - dt v NAMESlass="fs>mh, ls
67"+* - ignore PLde=c, PLde=cre0erlin>mh, );
L17f="+++++* - ignore PLCK, PLCKlass="rc>mh, 5123}
mh, L17f="+++++* dt naom_aatus" |= DIRrc>mh, )
mh, lsL17f="+++++* "fs/dt naom_didt tory    r()f">mh, ls429e5over_52>mh
67"+*f">mh, ls42a>5><53hrefe4href="+code=a
67"+* "fs/dt naom_renames()f">mh, ls 17refment">L17f="+++++* -  hre PLde=cf">mh, e5n);
L17f="+++++* - dt v PLde=cre0erlin>mh, 5131}

67"+*in>mh, L17f="+++++* "fs/dt naom_atush()f">mh, 5s="comment"> *42ow n432<5a>   53atu1"4href="+code=a
67"+* -  hre PLCKSf">mh,  * it42ets 432"5s/dlm53   m< 17refment">L17f="+++++* - dt v PLCKSre0erlin>mh, de53126" 4href="+code=a
67"+*rc>mh, L17f="+++++* dt naom_aatus" |= PLCKSf">mh,  * oth42 nod439e5mh
67"+*f">mh,  * they se4 the 44" i5="L1454hrefe4href="+code=a
67"+* "fs/dt naom_atush    r()f">mh,  *mh, e5line" name="L131"> 134  5     54   go 17refment">L17f="+++++* dt naom_aatus" |= DONEf">mh, 5L142" id="L1423 clas34  5 retu54 -<_r4href="+code=a
67"+*ef">mh,  5/
uint33_t
67">* Call="+by "fs/dt v; corresponds to "fs/dt "> 1umessage() b*/ specialf">mh, )
L17f="+++++Ifdt naomy-only 17f=s are  hrt through hereosref">mh, rcom_s42"fs/dt "> 1u> 192{
 1u> 19ef="flass="line" namersb"L192">91static void receive_rcom_status(struct dlm_ls sref">send_rcom(<,  id="L143" cl167status;
rcom_s42 13834m/5com.c54_version(&error5/a> = 0;
 192{
="sref">ls_flags
<_">="a hrstatus" class="sref">rcom_s42="sref">5eaerline"5ss="sref">ls_r3cover35t;5a hre5="+c (<, >,

<_">="sr);

cLver3_status" class="ver3_fs/dlm//dlclass="sref">cLde=LSFL_RCO" cleast n="L158"> 1lm//dlclass="sref">cLde_flags
<_">="a)ef="+cod= 0ss="sref">rcom_s42aspan cl5"sref">no5eid;
)
rcom_s4lass="lin5ss="sref"5nodeid == 3a hre351l5ne" n55L162" id="L162" cl"l"+code=Lu id64_r)
rcom_s3href="+co5ls" class5"sref">ls-3gt;dl3_re5ovf">55L164" id="L16switcha class="sref">cLf">ls_recover_lock);
 153 3   5     55com.c#L55" idcasefs/dlm/pu_to_le2OOKUPr_RESTATUSlass="line" "sref">cLOOKUPr_RESTATUSlass="fs/dan>
out;5dl55126" id="L126 id="L164" clcl"+code=LS);

rcom_s3href="+co5l="+code=5       }
 rcom_s3href="+co5lef="+cod5ef">nodeid3 cLOOKUPr_RENAMESf"/dan>
cLver3_status" class="ver3_fs/dlm/1ss="sref">rcom_s3href="+co5 class="l5ne" name="L1603> 16036t;5a hre56"+c rcom_s3href="+co5s="line" 5ame="L161"> 163 36t;5a hre56cLOOKUPr_RENAMESlass="fs/dan>
;
rcom_s3href="+co5 s" class5s="sref">rc_bu3,363 5     56=ls_recover    sizeof(strumemcpesponS);

rcom_s3href="+co5status_fl5gs);
rcom_s3href="+co5sn class=5"+code=rc" cla3s="sr36  5     56com.c#L55" idcasefs/dlm/pu_to_le2OOKUPr_REPLde=cline" "sref">cLOOKUPr_REPLde=cf"/dan>
;5">dlm_config. 1lm/1ss="sref">rcom_s3href="+co5s="+code=5ze);
 rcom_s3href="+co5f">ls5 cLOOKUPr_REPLde=class="fs/dan>
);
cLde=LSFL_RCO" cleast n="L158"> 1lm/1ss="sref">rcom_s3href="+co5s" class=5sref">ls, 3amp;<37t;5a hre57"+c );

rcom_s3href="+co5w_sync_re5ly" class="sre3">dis372M5NOR * rcom_s3href="+co5 class="l5ne" name="L1723> 1723/a>5     5 if 1" id="L10casefs/dlm/pu_to_le2OOKUPr_REPLs="line "sref">cLOCK 173 372e5="+co57=ls_recover    sizeof(strumemcpesponde_flags
<_">="a)ef="+cod= 1ss="sref">rcom_s3href="+co5wtatus_fl5out;
rcom_s3href="+co5ls" class5"sref">ls-3gt;cLOOKUPr_REPLCKlass="rcoman>
;5buf;

<_">="a)ef="+cod= 1ss="sref">rcom_s3href="+co5w="+code=5t" class="sref3>rc_r370f5>rc );

rcom_s3href="+co5w">ls5class="comment3>/*we37m/5com.c5L118" id="L118"+code=lbreakss="sref">rcom_s3href="+co5remote no5e %d not r3ady&q38lm5rca h58hreeeeeeeee="}ss="sref">rcom_s3href="+co5r" class=5class="sref">r3-38od5id5line" nam5="L181"> 181    38lm5rcom.58ls_flags
<_">="a pin>ls_fef="fizeof(struct rcom_s42="sref">50;
 6" id="L166" class="line" name="L16lvb class=dt naom_om.c#L59" iLkb_m.c#L1"s=dt naom_om.c#L class="sref">rcom_s3href="+co5rbuf" cla5="+code=rc" cl3ss="s38#L513" i5="L11eader" class="f="+code=mstoFL_RCO" cleast nstoFa>(<="fs/dlm kb"L192">test_bir)
LSFLlasCOVERYESTOcline" "sref">cLLSFLlasCOVERYESTOca>(<, izeof(struct , &a5rs="sref"5ls_recs#L59" id="L59" clus" cla="fs/dlm kb"L192"> 6" id="L166" class="line" name="L16lvb class=dt naom_o#L59" iLkb_lvb dl s=dt naom_o#L class="sref">rcom_s3href="+co5rs" class5       }
="a pin>unls_fef="fizeof(struct rcom_s42="sref">50out;5omment">/*wthe3calle381/5coom.58 class="sref">rcom_s42(<=izeofizeofa class="sref">cLf">ls_recover_lock);
cLOOKUPr_RESTATUS" claas="sref">rcom_s42 388erignoreline" "sref">cLignore class="sref">rcom_s3href="+co5"sref">er5or;
h_nodeid5e="L189">5189}
);

cLf">ls_recover_lock);
rcom_s42 * erignoreline" "sref">cLignore class="sref">rcom_s3href="+co5";
)
 142cLOOKUPS_NODEShref) izeofizeofa class="sref">cLver3_status" class="ver3_fs/dl|| class="sref">cLde=LSFL_RCO" cleast n="L158"> 1l|| class="sref">cLde_flags
<_">="a)ef="+coaas="sref">rcom_s42erignoreline" "sref">cLignore class="sref">rcom_s3href="+co5"s" class5com_status" cl3ss="s392"5s/dlm59=ls_recover_buf" cla4 < cLde=LSFL_RCO" cleast n="L158"> 1l|| class="sref">cLde_flags
<_">="a)ef="+coaas="sref">rcom_s42 erignoreline" "sref">cLignore class="sref">rcom_s3href="+co5"ss="line5en = sizeo3(stru39m/5com.c59>mh,  199  4     40a>6><6 href="+code=lswitcha class="sref">cLf">ls_recover_lock);
cLOOKUPr_RESTATUS" clan>
e6ror;
 *  1up_om_st.c#L59" iLkb_m.c#L1S<_"> 1up_om_st.c#Lef="fs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">6=rc_in" c6ass="sref">rc_4n40  6 retu60 -<_recoverf="+code=lbreakss="sref">rcom_s3href="+co6=a href="6code=dlm_rcom"42    402e6="+co60   goto cLOOKUPr_RENAMESf"/dan>
 1up_om_ver3_status" class="S<_"> 1up_om_ver3_ef="fs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">6=7"+code=6lt32_t" class=3sref"39m/6com.c60126" id="L126 id="L16breakss="sref">rcom_s3href="+co6=8"+code=6l" class="sref3>rc_h39a 6ref="60-> = sizeo3(stru39m/6="sre60118" id="L118casefs/dlm/pu_to_le2OOKUPr_REPLde=cline" "sref">cLOOKUPr_REPLde=cf"/dan>
ls41a>6><61hreeeeeeeee="+code=erclass="sref">cL <_"> 1up_om_re=LSFL_RCO" cleast n <_"> 1up_om_re=LSFef="fs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">62class="l6f" class="sref42rf rcom_s3href="+co62"sref">e6class="sref">r42/a>-41  6     6    goto  112    42    41a>6     61if 1" id="L10casefs/dlm/pu_to_le2OOKUPr_REPLs="line "sref">cLOCK  55
nodeilengt"> 168      eilengt"q" c -*sref">DL<fas/dlm/pu_to_le2) wonRCOMstatus" class="s wonRCOMfs/das="sref">rcom_s42erEshorr)
rcom_s3href="+co626"+code=6turn 0;
 1up_om_re_flags
<_">="a <_"> 1up_om_re_f91" cs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">627"+code=6115}
rcom_s3href="+co628"+code=64_t" class="sr42">ui41de6)
.61118" id="L118casefs/dlm/pu_to_le2OOKUPr_RESTATUSlass="line" "sref">cLOOKUPr_RESTATUSlass="fs/dan>
ls.62hreeeeeeeee="+code=erclass="sref">cL <_"> 1usyncse);
 1usyncse91" cs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">62code=ls"6class="sref">l42/a>-42t;6a hre62"+c rcom_s3href="+co62"sref">e6=ls" class="sr42">ls422;6a hre62   goto lscLOOKUPr_RENAMESlass="fs/dan>
);
 1usyncse);
 1usyncse91" cs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">62="+code=6123}
rcom_s3href="+co62ct )
cLOOKUPr_REPLde=class="fs/dan>
ls  1up_om_re=LSFse);
 1up_om_re=LSFse91" cs/dlm kb"L192"> href="+code=error" class="srercom_s42="sref">629"+code=6=ls" class="sr42">ls429e6over_62118" id="L118"+code=lbreakss="sref">rcom_s3href="+co62ef="+cod6=ls" class="sr42">ls42a>6><63i id="L152" class="f">h_nodeid62e=ls" cl6ss="sref">lscLOOKUPr_REPLCKlass="rcoman>
e6n);
 *   55
nodeilengt"> 168      eilengt"q" c -*sref">DL<fas/dlm/pu_to_le2) wonRCOMstatus" class="s wonRCOMfs/das="sref">rcom_s426131}
erEshorr)
rcom_s3href="+co62_rcom_sp6#L133" id="L1342 cla43#L613" i63=ls_recover    sizeof(strumemcpespon"fs/dt naom_process=="+c2{
 href="+code=error" class="srercom_s42="sref">62="L123">6s="comment"> *42ow n432<6a>   63L17f="+++++f="+code=lbreakss="sref">rcom_s3href="+co62n class=6comment"> * it42ets 432"6s/dlm63=ls_recover_buf" cla4 < de637f 1" id="L10defaultan>
 mh);
 href="+code=error" class=17refment">Lstring">"r<_"> 1up_om bad 
mh
rcom_s3href="+co629"+code=6omment"> * oth42 nod439e6 * they se4 the 44" i6="L1464href="+code=ls" class="sref">rcom_s3href="+co6/aerline"6n hrefode=L2FL_RCOrlde=l6re(m<64= 62"sref">e6line" name="L131"> 134  6     64   go lass="sref">erignoreline" "sref">cLignore claan>
6L142" id="L1423 clas34  6 retu64L162" id="L162" cl"l"+code=Llog_limir)
 href="+code=error" class=17refment">Lstring">""fs/dt "> 1u> 19 ignore msg %d "f">mh

Lstring">"fr19 %d %llu %llu dt naom seq %llu sts %x gen %u"f">mh
6s="sref">uint33_t

)
 = 
cLf">ls_recover_lock);

 cLf">ls_recover_lock);

 13834m/6com.c64118" id="L118"+code=l666(unsigned long long)class="sref">cLs#L59" id="L59" clus" cla"n>
error6/a> = 0;
cLd6" id="L166" class="line" name="L16lvb class=generatio">h_nodeidrcom_s3href="+co6eaerline"6ss="sref">ls_r3cover35t;6a hre6="+c rcom_s3href="+co6"sref">no6eid;
erEshorr)

 == 3a hre351l6ne" n65L162" id="L162" cl"l"+code=Llog_s="sref">mh);
 href="+code=error" class=17refment">Lstring">"r<_naomy message %d fr19 %d is too shorr"f">mh
ls-3gt;
status;
rcom_s3href="+co6"="L123">6tus" class="sr3f">dl3_re6ovf">65L164"a href="+code=er32href="fs6en class=6ame="L155"> 153 3   6     65=ls_recover_buf" cla4 < out;6dl65126" 
The original LXR software by the cover_bufhttp://sourceforge.net/projects/lxre>LXR rxr./dlux.no kindly host="+by cover_bufhttp://www.redpill-/dlpro.noroRedpill Ldlpro AS sprovidom of Ldlux