The Samba-Bugzilla – Bug 10541
sys_path_to_bdev fails for btrfs subvolumes
Last modified: 2017-08-07 12:48:43 UTC
[2014/04/05 13:25:20.282135, 0] ../source3/lib/sysquotas.c:406(sys_get_quota)
sys_path_to_bdev() failed for path [.]!
whenever a path from a btrfs subvolume is accessed (for example when typing ls in smbclient).
I did some debugging and the reason is that btrfs has per subvolume st_dev values, but only the main volume appears in getmntent(). The loop in sys_path_to_bdev thus fails to find the mount path.
I have only one mounted partition
/dev/sda3 on / type btrfs (rw,relatime,space_cache)
/mnt is a folder and /mnt/data, /mnt/data/share are subvolumes:
Device: 12h/18d Inode: 256
Device: 12h/18d Inode: 2512
Device: 26h/38d Inode: 256
Device: 2dh/45d Inode: 256
Thanks for the report Andreas, I've hit this one too.
Btrfs quotas are applied at a subvolume level and can restrict total, unshared or compressed data usage. Handling of this filesystem specific behaviour may be better suited for the vfs_btrfs module. I need to take a closer look.
there is a similar problem for XFS. XFS also has the concept of directory based quotas (project quota). I think the concept of directory based quota is hard to get in line with SMB quotas, which have no clue of directory based quotas AFAIK. In any case I think if we can find a good solution in Samba it should be generic and not in vfs_btrfs only.
Hi all, are there updates on this bug? I hit the problem on my configuration, and I'd like to help if needed.
Dave, did you make any progress here? Any idea how to solve that?
Afaik Windows allows setting quota on junction points. Mapping subvolumes to junction points might be a way to cleanly map the subvolume quota problem to the windows world. Though, I think our support for junction points generally needs to be improved for that.
This happens with a zfs filesystem as well.
Fairly old bug, still hitting this with 4.6.5 - and with the vfs_btrfs module.