Re: File test operator for subvols; possible bug in 'btrfs show <directory>'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux