8162520: (fs) FileStore should support file stores with > Long.MAX_VALUE capacity
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Oct 3 16:49:05 UTC 2019
> On Oct 3, 2019, at 9:17 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 01/10/2019 17:07, Brian Burkhalter wrote:
>> :
>> Here is an updated version with default instead of abstract methods:
>>
>> http://cr.openjdk.java.net/~bpb/8162520/webrev.01/ <http://cr.openjdk.java.net/~bpb/8162520/webrev.01/>
> The default methods look right. I'm not sure about the change to the existing methods to specify a negative value. That isn't going to work with code that calls say getUnallocatedSpace() to get an idea on whether there is enough space to create a large file. You'll probably end up picking the best of a bad bunch so finding at least some usages of the existing methods may help.
So I think you are suggesting that returning Long.MAX_VALUE would signify that the result is actually >= Long.MAX_VALUE. That seems OK to me but I think would need to be documented. Also, I think some changes in the native layer would be needed to trap the cases where the unsigned values would overflow a signed long so that min(unsignedSize,9223372036854775807L) is returned instead of an overflowed long.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191003/78aba9d0/attachment-0001.html>
More information about the nio-dev
mailing list