<div><div style="line-height: 21px;">If md.nr_disks changes from 1 to 0, the node is pure gateway then. Seems it doesn't need</div><div style="line-height: 21px;">to <span style="line-height: 1.5;">do any recovery work since no object will locate in the pure gateway.<span id="_editor_bookmark_start_1" style="display: none; line-height: 0px;">‍</span></span></div></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "Hitoshi Mitake";<mitake.hitoshi@lab.ntt.co.jp>;</div><div><b>Date: </b> Thu, Sep 11, 2014 10:34 AM</div><div><b>To: </b> "Bingpeng Zhu"<nkuzbp@foxmail.com>; <wbr></div><div><b>Cc: </b> "sheepdog"<sheepdog@lists.wpkg.org>; "Bingpeng Zhu"<bingpeng.zbp@alibaba-inc.com>; <wbr></div><div><b>Subject: </b> Re: [sheepdog] [PATCH v1] sheep/md: fix dog cluster info command show wrong disk number</div></div><div><br></div>At Wed, 10 Sep 2014 20:08:32 +0800,<br>Bingpeng Zhu wrote:<br>> <br>> If we enable diskvnodes mode and encounter EIO, running dog<br>> cluster info will show wrong disk number in the new epoch.<br>> We should update node disks when handling EIO and unplug the<br>> disk.<br>> <br>> Signed-off-by: Bingpeng Zhu <bingpeng.zbp@alibaba-inc.com><br>> ---<br>>  sheep/md.c |    3 +++<br>>  1 files changed, 3 insertions(+), 0 deletions(-)<br>> <br>> diff --git a/sheep/md.c b/sheep/md.c<br>> index b13d30a..378d1f1 100644<br>> --- a/sheep/md.c<br>> +++ b/sheep/md.c<br>> @@ -541,6 +541,9 @@ static void md_do_recover(struct work *work)<br>>  out:<br>>        sd_rw_unlock(&md.lock);<br>>  <br>> +        if (disk)<br>> +               update_node_disks();<br>> +<br><br>The change looks reasonable. But I have a question:<br><br>>        if (nr > 0)<br>>               kick_recover();<br><br>Does the above conditional branch (nr > 0) required? When a node has<br>single disk and faces EIO, md.nr_disks can change from 1 to 0. In such<br>a case, the code will not call kick_recover(). I think it is a<br>problematic behavior. How do you think?<br><br>Thanks,<br>Hitoshi<br><br>>  <br>> -- <br>> 1.7.1<br>> <br>> <br>> <br>> <br>> -- <br>> sheepdog mailing list<br>> sheepdog@lists.wpkg.org<br>> http://lists.wpkg.org/mailman/listinfo/sheepdog<br></div>