From: Anand Jain <Anand.Jain@oracle.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs@vger.kernel.org, zab@redhat.com, dsterba@suse.cz
Subject: Re: [PATCH 3/4 v2] btrfs-progs: fs show should handle if subvol(s) mounted
Date: Thu, 07 Nov 2013 17:54:04 +0800 [thread overview]
Message-ID: <527B633C.8030700@oracle.com> (raw)
In-Reply-To: <20131106201911.GF27784@localhost.localdomain>
Thanks sent out v3
On 11/07/13 04:19 AM, Josef Bacik wrote:
> On Mon, Nov 04, 2013 at 11:45:44AM +0800, Anand Jain wrote:
>> as of now with out this patch user would see
>> fsinfo per btrfs mount path but which mean multiple
>> entry if more than one subvol is mounted of the same
>> fsid. so this patch will handle that nicely.
>>
>> v2: accepts Zach suggested
>>
>> Signed-off-by: Anand Jain<anand.jain@oracle.com>
>> ---
>> cmds-filesystem.c | 90 +++++++++++++++++++++++++++++++++--------------------
>> utils.c | 88 ++++++++++++++++++++++++++++++++++++++++++---------
>> utils.h | 3 +-
>> 3 files changed, 130 insertions(+), 51 deletions(-)
>>
>> diff --git a/cmds-filesystem.c b/cmds-filesystem.c
>> index d2cad81..f8e8475 100644
>> --- a/cmds-filesystem.c
>> +++ b/cmds-filesystem.c
>> @@ -317,6 +317,29 @@ static int print_one_fs(struct btrfs_ioctl_fs_info_args *fs_info,
>> return 0;
>> }
>>
>> +static void handle_print(char *mnt, char *label)
>> +{
>> + int fd;
>> + struct btrfs_ioctl_fs_info_args fs_info_arg;
>> + struct btrfs_ioctl_dev_info_args *dev_info_arg = NULL;
>> + struct btrfs_ioctl_space_args *space_info_arg;
>> +
>> + if (get_fs_info(mnt,&fs_info_arg,&dev_info_arg)) {
>> + fprintf(stdout, "ERROR: get_fs_info failed\n");
>> + return;
>> + }
>> +
>> + fd = open(mnt, O_RDONLY);
>> + if (fd> 0&& !get_df(fd,&space_info_arg)) {
>
> 0 is a valid fd. Thanks,
>
> Josef
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-11-07 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 3:45 [PATCH 1/4] btrfs-progs: make filesystem show by label work Anand Jain
2013-11-04 3:45 ` [PATCH 2/4 v2] btrfs-progs: mechanism to fetch fsinfo from btrfs-control Anand Jain
2013-11-06 20:13 ` Josef Bacik
2013-11-07 9:53 ` Anand Jain
2013-11-04 3:45 ` [PATCH 3/4 v2] btrfs-progs: fs show should handle if subvol(s) mounted Anand Jain
2013-11-06 20:19 ` Josef Bacik
2013-11-07 9:54 ` Anand Jain [this message]
2013-11-04 3:45 ` [PATCH 4/4] btrfs-progs: lblkid wouldn't find non mapper path input Anand Jain
2013-11-04 4:36 ` [PATCH 4/4 v2] " Anand Jain
2013-11-06 20:20 ` [PATCH 4/4] " Josef Bacik
2013-11-07 9:54 ` Anand Jain
2013-11-07 10:06 ` [PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3 Anand Jain
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=527B633C.8030700@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zab@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).