linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/3] btrfs-progs: fix max mirror number error for chunk-recover
Date: Wed, 25 Jun 2014 14:51:44 +0800	[thread overview]
Message-ID: <1403679104.8186.9.camel@localhost.localdomain> (raw)
In-Reply-To: <53AA5D46.4080203@redhat.com>

On Wed, 2014-06-25 at 00:25 -0500, Eric Sandeen wrote:
> On 6/25/14, 12:14 AM, Eric Sandeen wrote:
> > On 6/24/14, 9:22 PM, Gui Hecheng wrote:
> >> > On Tue, 2014-06-24 at 21:17 -0500, Eric Sandeen wrote:
> >>> >> On 6/11/14, 9:25 PM, Gui Hecheng wrote:
> >>>> >>> When run chunk-recover on a health btrfs(data profile raid0, with
> >>>> >>> plenty of data), the program has a chance to abort on the number
> >>>> >>> of mirrors of an extent.
> >>>> >>>
> >>>> >>> According to the kernel code, the max mirror number of an extent
> >>>> >>> is 3 not 2:
> >>>> >>> 	ctree.h: 		BTRFS_MAX_MIRRORS	3
> >>>> >>> 	chunk-recover.c :	BTRFS_NUM_MIRRORS	2
> >>>> >>> just change BTRFS_NUM_MIRRORS to 3, and everything goes well.
> >>> >>
> >>> >> Wouldn't it make a lot more sense, then, to change the userspace
> >>> >> macro to be called BTRFS_MAX_MIRRORS as well?
> >>> >>
> >>> >> -Eric
> >>> >>
> >> > Yes, Eric, unify the names between userspace and kernelspace is really a
> >> > good point. Also, I plan to move the macro into ctree.h, what do you
> >> > think?
> > It's only used in chunk-recover.c, so I don't see much point to moving it
> > to a new file.
> 
> Sorry, I take that back.  Actually -
> 
> Yes, I think it does make sense, just so that userspace moves slightly closer to
> kernelspace.
> 
> -Eric (who said long ago that he wanted to try to sync things up, but
> found himself daunted by the task, and failed)

Aha,it's really a huge work for one person to do the sync things.
But Rome was not built in one day by one guy. We have a long way to go
and let's take one more step now :)

-Gui


  reply	other threads:[~2014-06-25  6:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  2:24 [PATCH 1/3] btrfs-progs: fix missing parity stripe for raid6 in chunk-recover Gui Hecheng
2014-06-12  2:25 ` [PATCH 2/3] btrfs-progs: fix max mirror number error for chunk-recover Gui Hecheng
2014-06-25  2:17   ` Eric Sandeen
2014-06-25  2:20     ` Wang Shilong
2014-06-25  2:22     ` Gui Hecheng
2014-06-25  5:14       ` Eric Sandeen
2014-06-25  5:25         ` Eric Sandeen
2014-06-25  6:51           ` Gui Hecheng [this message]
2014-06-12  2:25 ` [PATCH 3/3] btrfs-progs: cleanup unused assignment " Gui Hecheng
2014-06-12  7:45 ` [PATCH 1/3] btrfs-progs: fix missing parity stripe for raid6 in chunk-recover Duncan
2014-06-12  8:11   ` Gui Hecheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403679104.8186.9.camel@localhost.localdomain \
    --to=guihc.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).