RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
Brian Burkhalter
bpb at openjdk.org
Mon Aug 15 17:28:11 UTC 2022
On Mon, 15 Aug 2022 16:39:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> This is hard to review. Would it be possible to provide a summary on the APIs and df behave with quotas?
We use the Windows API [GetDiskFreeSpaceEx](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespaceexw) wherein it is stated
- lpFreeBytesAvailableToCaller: If per-user quotas are being used, this value may be less than the total number of free bytes on a disk.
- lpTotalNumberOfBytes: If per-user quotas are being used, this value may be less than the total number of bytes on a disk.
The `df` command on the other hand appears to be using something like [GetQuotaInformation](https://docs.microsoft.com/en-us/windows/win32/api/dskquota/nf-dskquota-idiskquotauser-getquotainformation) which fills a [structure](https://docs.microsoft.com/en-us/windows/win32/api/dskquota/ns-dskquota-diskquota_user_information) which accounts for the quota and provides the currently used and maximum allowed number of bytes for a user.
-------------
PR: https://git.openjdk.org/jdk/pull/9856
More information about the core-libs-dev
mailing list