From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: boris <6401e46d@opayq.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: File test operator for subvols; possible bug in 'btrfs show <directory>'
Date: Tue, 25 Nov 2014 13:33:31 +0800 [thread overview]
Message-ID: <1416893611.2576.7.camel@localhost.localdomain> (raw)
In-Reply-To: <loom.20141125T024507-20@post.gmane.org>
On Tue, 2014-11-25 at 02:11 +0000, boris wrote:
> Hi all,
>
> I was looking for a quick method of testing whether a working directory is a
> subvolume.
>
> Couldn't see an obvious one, so tried 'btrfs show <somesubvol≥'. It printed
> a fail message as expected but returned 0 exit status. Bug?
Hi boris,
I take a quick look at the code branch and I think it is a Bug indeed.
THe code just forgot to set the proper return value before leave out.
To test whether a dir is a subvolume, what about
# btrfs sub list | grep <dirname>
as 'btrfs sub list will list all subvolumes under <mntpoint>.
The dirname should be relative path under <mntpoint> is as I could
remember.
Thanks,
Gui
> Can I put in a feature request for a shell file test operator for subvols,
> please (or something of the kind)? http://tldp.org/LDP/abs/html/fto.html .
> The letter v (for volume, both upper and lower case forms; one for subvol,
> other for snapshots) is unused afaict.
>
> Have I missed the obvious? Or scored a false positive?
>
> TIA.
>
> --
> 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:[~2014-11-25 5:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 2:11 File test operator for subvols; possible bug in 'btrfs show <directory>' boris
2014-11-25 5:33 ` Gui Hecheng [this message]
2014-11-25 7:32 ` Goffredo Baroncelli
2014-11-27 17:21 ` 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=1416893611.2576.7.camel@localhost.localdomain \
--to=guihc.fnst@cn.fujitsu.com \
--cc=6401e46d@opayq.com \
--cc=linux-btrfs@vger.kernel.org \
/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).