Created attachment 13176 [details] disk quota fix Code in Samba:source3/smbd/quotas.c need brush-up. Especially the nfs quotas are requested by the RPC call directly to remote "rquotad" running on the remote server. Such concept is simply weird for several reasons but the main reason is the code do not work anymore and return "0". Samba is using qouta as a "disk free" so this bug make all disks "full". ZFS and Oracle HSM (aka. samfs) are not supported for quota. I propose "less radical" patch which do not remove the code but switch it off from the compilation only. If Samba.org community will decide to remove this meister-stueck of code no one will cry for it I hope.
you are proposing to fix slightly different problems in the quota are here with a single patch which looks with the USE_OBSOLETED_SOLARIS_APIS define a bit hackish at the same time. Can you please create separate patches for each problem and describe each issue along with the patch in a git format patch?
Jura: can you specifically say which alternative solution you would propose for querying NFS server quotas?
I am using fcntl() which will return either quota nor -1 (with ENOSUP set in errno) in case if the Samba-shared file-system do not support quota (fcntl() asks quota directly on Solaris VFS). My patch: https://github.com/oracle/solaris-userland/blob/master/components/samba/patches/fix_solaris_quotas.patch is simplified so it only keying-off the obsoleted code by #if defined(SUNOS5NOTSUP) and leaves the decision if the code will be removed or not on Samba.org community.