Bug 12758 - Solaris disk quotas fix
Summary: Solaris disk quotas fix
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2017-04-26 21:43 UTC by Jura Sasek
Modified: 2022-03-04 09:36 UTC (History)
4 users (show)

See Also:

disk quota fix (1.44 KB, patch)
2017-04-26 21:43 UTC, Jura Sasek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jura Sasek 2017-04-26 21:43:51 UTC
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.
Comment 1 Björn Jacke 2019-01-06 22:10:05 UTC
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?
Comment 2 Björn Jacke 2019-02-16 23:12:31 UTC
Jura: can you specifically say which alternative solution you would propose for querying NFS server quotas?
Comment 3 Jura Sasek 2019-02-17 22:20:58 UTC
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:
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.