From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: Mike Fleetwood <mike.fleetwood@googlemail.com>
Cc: David Sterba <dsterba@suse.cz>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] btrfs-progs: fix wrong num_devices for btrfs fi show with seed devices
Date: Mon, 10 Nov 2014 15:53:10 +0800 [thread overview]
Message-ID: <1415605990.21952.12.camel@localhost.localdomain> (raw)
In-Reply-To: <CAMU1PDjN0Q4Q=0kzrgjAKCmMdtMGBg-iMTONqQY3m0LuKDzJaA@mail.gmail.com>
On Sat, 2014-11-08 at 19:47 +0000, Mike Fleetwood wrote:
> On 7 November 2014 18:16, David Sterba <dsterba@suse.cz> wrote:
> > On Fri, Nov 07, 2014 at 10:07:43AM +0800, Gui Hecheng wrote:
> >> The @fi_args->num_devices in @get_fs_info() does not include seed devices.
> >> We could just correct it by searching the chunk tree and count how
> >> many dev_items there are in total which includes seed devices.
> >>
> >> Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
> >> ---
> >> *Note*
> >> This is just a temporary workaround to fix this problem in order to
> >> make users happy, because a new ioctl or sysfs interface to handle this
> >> problem needs more discussions and efforts. After the work implemented
> >> and accepted, we could drop this.
> >
> > Nice, thanks. I agree that this kind of workaround is best possible for
> > the moment, and I'm glad to see that it's not that much code to get the
> > seeding devices right. This would also work with older kernels without
> > the updated sysfs/ioctl interfaces, so this is likely to stay for a long
> > time.
> >
> >> +u64 find_max_id(struct btrfs_ioctl_search_args *search_args, int nr_items)
> >
> > That's a very generic name for a function that does a very specialized
> > thing, but I don't have a suggestion right now.
>
> Is find_max_device_id a suitable name?
I think this one is really more clear.
> >> +int correct_fs_info(int fd, struct btrfs_ioctl_fs_info_args *fi_args)
> >
> > Same here, make fs_info correct but in what way? A comment would be good
> > as well.
>
> Sorry, no suggestion for this function name.
may be @search_chunk_tree_for_fs_info?
Thanks for the suggestions.
-Gui
> Thanks,
> Mike
next prev parent reply other threads:[~2014-11-10 7:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 2:07 [PATCH] btrfs-progs: skip fs with no seed when build seed/sprout mapping for fi show Gui Hecheng
2014-11-07 2:07 ` [PATCH 1/2] btrfs-progs: remove BUG_ON on num of devices for btrfs " Gui Hecheng
2014-11-07 2:07 ` [PATCH 2/2] btrfs-progs: fix wrong num_devices for btrfs fi show with seed devices Gui Hecheng
2014-11-07 18:16 ` David Sterba
2014-11-08 1:03 ` anand jain
2014-11-08 19:47 ` Mike Fleetwood
2014-11-10 7:53 ` Gui Hecheng [this message]
2014-11-07 17:41 ` [PATCH] btrfs-progs: skip fs with no seed when build seed/sprout mapping for fi show David Sterba
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=1415605990.21952.12.camel@localhost.localdomain \
--to=guihc.fnst@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=mike.fleetwood@googlemail.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