Web lists-archives.com

[Samba] DFree and sub-Share "disk" (volume?)




James Wright <12wrigja@xxxxxxxxx>
9:56 PM (13 minutes ago)
to samba
Hi Samba users,

I have a Samba server with a single share backed by a ZFS pool / collection
of datasets. I can correctly navigate around the share, but the free space
reporting within clients is inaccurate for various directories, especially
those that are themselves setup as datasets in ZFS and have quota applied
to them.

I read over the documentation for both the 'dfree' and 'get quota command'
options, but it seems that the paths those pass as their first parameter
are useless to me, as they mostly seem to be the share's root (represented
as '.'), not the actual path being queried.

Looking over the SAMBA source, I believe that if
https://github.com/samba-team/samba/blob/f33749fc84dacb164d1ac43f6bfcae7afcca34b3/source3/smbd/dfree.c#L63
was
changed to pass the entire filepath to the dfree command I could achieve
what I wanted. A couple questions:

 - Is the filename that is passed there the name of the directory being
queried, or is my understanding incorrect?
 - in many places, it's common to see that variable called with the
basename function. I can't seem to find where that is defined - any
pointers?
 - If this is something that would work, would the samba team be open to
adding this as an option to the dfree config, as I image that it's probably
not guaranteed to be backwards-compatible with the existing behaviour.

Thanks,

James
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba