8162520: (fs) FileStore should support file stores with > Long.MAX_VALUE capacity
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Oct 1 14:36:17 UTC 2019
> On Sep 30, 2019, at 11:43 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>
>> On Sep 28, 2019, at 9:07 AM, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>>
>> On 27/09/2019 22:02, Brian Burkhalter wrote:
>>> :
>>>
>>> 1. Return the number of blocks of each type
>>>
>>> long getTotalBlocks();
>>> long getUnallocatedBlocks();
>>> long getUsableBlocks();
>>>
>>> The respective sizes in whichever units can then be computed by the caller using the value returned by getBlockSize().
>> This option does fit with the recently added getBlockSize, I just wonder if 2^63 blocks is enough. The native APIs seem to allow up to 2^64 (unsigned).
>
> I’m not sure what can be done aside from using an alternate representation instead of a long. The product of getTotalBlocks() and getBlockSize() would give a very large range of values.
Here is a stab [1] at fixing [2] using the above approach.
Thanks,
Brian
[1] http://cr.openjdk.java.net/~bpb/8162520/webrev.00/
[2] https://bugs.openjdk.java.net/browse/JDK-8162520
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191001/ab5ebfb3/attachment.html>
More information about the nio-dev
mailing list