8162520: (fs) FileStore should support file stores with > Long.MAX_VALUE capacity
Alan Bateman
Alan.Bateman at oracle.com
Mon Oct 14 08:51:22 UTC 2019
On 11/10/2019 01:22, Brian Burkhalter wrote:
> An updated version is here
> http://cr.openjdk.java.net/~bpb/8162520/webrev.02/. This changes the
> various get*{Blocks,Space}() methods to return Long.MAX_VALUE if the
> respective size would overflow a long. The patch passes all the
> java.nio tests on all platforms.
Thanks, I think this is probably the best of the options so far.
The new methods need to link to getBlockSize to find out what a block
is. In the javadoc, the "In this case" sentence seems to suggest that
the new methods should be used as a fallback when MAX_VALUE is returned.
I think we need to adjust this wording to make it clearer that the
getXXXBlocks methods is the recommended way to get the space
information. Minor nit in the @implSpec is "throws UOE" rather than
"throws an UOE" might be better.
The File.getXXXSpace methods will need attention too, maybe a separate
issue to clarify their specs, fix the implementation, and link them to
the methods in FileStore.
-Alan
More information about the nio-dev
mailing list