[RFC] JDK-8162520: (fs) FileStore should support file stores with > Long.MAX_VALUE capacity

Brian Burkhalter brian.burkhalter at oracle.com
Mon Sep 30 18:43:09 UTC 2019


> On Sep 28, 2019, at 9:07 AM, Alan Bateman <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.

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190930/e4a461af/attachment.html>


More information about the nio-dev mailing list