lxd/storage_btrfs.go
func isBtrfsSubVolume(subvolPath string) bool {
	fs := syscall.Stat_t{}
	err := syscall.Lstat(subvolPath, &fs)
	if err != nil {
		return false
	}

	// Check if BTRFS_FIRST_FREE_OBJECTID
	if fs.Ino != 256 {
		return false
	}

	return true
}
func isBtrfsSubVolume(subvolPath string) bool {
	fs := syscall.Stat_t{}
	err := syscall.Lstat(subvolPath, &fs)
	if err != nil {
		return false
	}

	// Check if BTRFS_FIRST_FREE_OBJECTID
	if fs.Ino != 256 {
		return false
	}

	return true
}
func isBtrfsSubVolume ( subvolPath string ) bool { fs := syscall . Stat_t { } err := syscall . Lstat ( subvolPath , & fs ) if err != nil { return false } // Check if BTRFS_FIRST_FREE_OBJECTID if fs . Ino != 256 { return false } return true }
// isBtrfsSubVolume returns true if the given Path is a btrfs subvolume else
// false.
isBtrfsSubVolume returns true if the given Path is a btrfs subvolume else false .