Bug 11937 - on XFS filesystem, reported free disk is clamped to quota even if quota is not enforced
Summary: on XFS filesystem, reported free disk is clamped to quota even if quota is no...
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.4.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-05-26 20:14 UTC by Uri Simchoni
Modified: 2016-06-02 10:17 UTC (History)
2 users (show)

See Also:

git-am fix for 4.4.next (8.53 KB, patch)
2016-05-28 17:23 UTC, Uri Simchoni
jra: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Uri Simchoni 2016-05-26 20:14:54 UTC
On XFS filesystem, quota accounting can be enabled without enforcing quota. That is, usage is recorded for each user, quota soft/hard limit can be configured for each user or group, but no actual enforcement occurs when trying to exceed quota.

In that case, the "free disk" reporting must not take quota into account because quota would not limit disk usage. However, Samba clamps the free disk with the user's configured quota values.

The desired behavior:
I verified (by experimentation) that:
1. NTFS has a similar notion of separately turning on accounting and enforcement.
2. On a Windows server, getting/setting user quota can be done even if enforcement is off - getting quota (e.g. by smbcquotas) returns the configured value even if quota is not enforcing
3. OTOH, disk size and free space is not clamped by quota if no enforcement takes place.

This means that for XFS, smbcquotas is not affected by whether the system is enforcing or not, but smbclient free-disk printout is affected.
Comment 1 Uri Simchoni 2016-05-28 17:23:19 UTC
Created attachment 12142 [details]
git-am fix for 4.4.next
Comment 2 Jeremy Allison 2016-05-31 20:35:49 UTC
Comment on attachment 12142 [details]
git-am fix for 4.4.next

Comment 3 Jeremy Allison 2016-05-31 20:36:12 UTC
Re-assigning to Karolin for inclusion in 4.4.next.
Comment 4 Karolin Seeger 2016-06-01 07:49:49 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-4-test.
Comment 5 Karolin Seeger 2016-06-02 10:17:02 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to v4-4-test.
Closing out bug report.