Bug 11681 - wrong disk size reporting if statvfs block size is different than quota block size
wrong disk size reporting if statvfs block size is different than quota block...
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.3.4
All Linux
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-19 12:15 UTC by Uri Simchoni
Modified: 2016-02-04 07:58 UTC (History)
3 users (show)

See Also:


Attachments
git-am fix for 4.4.next (1.30 KB, patch)
2016-01-28 05:50 UTC, Uri Simchoni
jra: review+
Details
git-am fix for 4.3.next (1.30 KB, patch)
2016-01-28 05:51 UTC, Uri Simchoni
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uri Simchoni 2016-01-19 12:15:19 UTC
When calculating disk size and free space to show the user (e.g. when issuing "dir" at Windows command prompt), the displayed value is the lesser of global size and free space, and the quota-derived value.

However, while the global values are normalized to block size of 512 bytes, the quota values are not normalized and depend on the block size of the quota system.

On Linux, with file systems which don't use the XFS quota inteface (e.g. EXT4), the reported / set quota is in units of 1K, hence the comparison between quota and global values is wrong.

For example, if the disk size is 300MB and the quota is 500MB, the quota is ~500,000 blocks of 1K and the disk is ~600,000 blocks of 512 bytes, making the quota seem like the limiting factor (less blocks).
Comment 1 Uri Simchoni 2016-01-28 05:50:45 UTC
Created attachment 11794 [details]
git-am fix for 4.4.next
Comment 2 Uri Simchoni 2016-01-28 05:51:23 UTC
Created attachment 11795 [details]
git-am fix for 4.3.next
Comment 3 Jeremy Allison 2016-01-28 22:00:39 UTC
Comment on attachment 11794 [details]
git-am fix for 4.4.next

LGTM.
Comment 4 Jeremy Allison 2016-01-28 22:00:58 UTC
Comment on attachment 11795 [details]
git-am fix for 4.3.next

LGTM.
Comment 5 Jeremy Allison 2016-01-28 22:01:22 UTC
Re-assigning to Karolin for inclusion in 4.4.0, 4.3.next.
Comment 6 Karolin Seeger 2016-02-02 11:01:45 UTC
(In reply to Jeremy Allison from comment #5)
Pushed to autobuild-v4-[3|4]-test.
Comment 7 Karolin Seeger 2016-02-04 07:58:25 UTC
(In reply to Karolin Seeger from comment #6)
Pushed to both branches.
Closing out bug report.

Thanks!