[sheepdog]   [PATCH v1] sheep/md: fix dog cluster info command show wrong disk number

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Sep 11 06:55:58 CEST 2014


At Thu, 11 Sep 2014 10:53:42 +0800,
=?utf-8?B?QmluZ3BlbmcgWmh1?= wrote:
> 
> [1  <multipart/alternative (8bit)>]
> [1.1  <text/plain; utf-8 (base64)>]
> If md.nr_disks changes from 1 to 0, the node is pure gateway then. Seems it doesn't need
> to do any recovery work since no object will locate in the pure gateway.‍

But other nodes must execute recovery because redundancy is decreased, no?

Thanks,
Hitoshi

> 
> 
> 
> 
> 
> ------------------ Original ------------------
> From:  "Hitoshi Mitake";<mitake.hitoshi at lab.ntt.co.jp>;
> Date:  Thu, Sep 11, 2014 10:34 AM
> To:  "Bingpeng Zhu"<nkuzbp at foxmail.com>; 
> Cc:  "sheepdog"<sheepdog at lists.wpkg.org>; "Bingpeng Zhu"<bingpeng.zbp at alibaba-inc.com>; 
> Subject:  Re: [sheepdog] [PATCH v1] sheep/md: fix dog cluster info command show	wrong disk number
> 
> 
> 
> At Wed, 10 Sep 2014 20:08:32 +0800,
> Bingpeng Zhu wrote:
> > 
> > If we enable diskvnodes mode and encounter EIO, running dog
> > cluster info will show wrong disk number in the new epoch.
> > We should update node disks when handling EIO and unplug the
> > disk.
> > 
> > Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
> > ---
> >  sheep/md.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/sheep/md.c b/sheep/md.c
> > index b13d30a..378d1f1 100644
> > --- a/sheep/md.c
> > +++ b/sheep/md.c
> > @@ -541,6 +541,9 @@ static void md_do_recover(struct work *work)
> >  out:
> >  	sd_rw_unlock(&md.lock);
> >  
> > +	if (disk)
> > +		update_node_disks();
> > +
> 
> The change looks reasonable. But I have a question:
> 
> >  	if (nr > 0)
> >  		kick_recover();
> 
> Does the above conditional branch (nr > 0) required? When a node has
> single disk and faces EIO, md.nr_disks can change from 1 to 0. In such
> a case, the code will not call kick_recover(). I think it is a
> problematic behavior. How do you think?
> 
> Thanks,
> Hitoshi
> 
> >  
> > -- 
> > 1.7.1
> > 
> > 
> > 
> > 
> > -- 
> > sheepdog mailing list
> > sheepdog at lists.wpkg.org
> > http://lists.wpkg.org/mailman/listinfo/sheepdog
> [1.2  <text/html; utf-8 (base64)>]
> 
> [2  <text/plain; us-ascii (7bit)>]
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list