From: David Sterba <dsterba@suse.cz>
To: Goffredo Baroncelli <kreijack@inwind.it>
Cc: boris <6401e46d@opayq.com>, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: File test operator for subvols; possible bug in 'btrfs show <directory>'
Date: Thu, 27 Nov 2014 18:21:25 +0100 [thread overview]
Message-ID: <20141127172125.GC12140@twin.jikos.cz> (raw)
In-Reply-To: <54743094.8050200@inwind.it>
On Tue, Nov 25, 2014 at 08:32:36AM +0100, Goffredo Baroncelli wrote:
> On 11/25/2014 03:11 AM, boris wrote:
> > Hi all,
> >
> > I was looking for a quick method of testing whether a working directory is a
> > subvolume.
>
> Currently btrfs check that:
> - the inode number is 255
It's 256.
> return (st.st_ino == 256) && S_ISDIR(st.st_mode);
The shell test to identify a subvolume is
[ -d "$dir" -a `stat --format=%i "$dir"` = 256
prev parent reply other threads:[~2014-11-27 17:21 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
2014-11-25 7:32 ` Goffredo Baroncelli
2014-11-27 17:21 ` David Sterba [this message]
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=20141127172125.GC12140@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=6401e46d@opayq.com \
--cc=kreijack@inwind.it \
--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).