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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to