[Info-vax] 64-bit file sizes, was: Re: scp or sftp: file is "raw", needs to be parsed - possible to work around that?

Arne Vajhøj arne at vajhoej.dk
Thu May 20 15:12:58 EDT 2021


On 5/20/2021 1:59 PM, Simon Clubley wrote:
> On 2021-05-20, Stephen Hoffman <seaohveh at hoffmanlabs.invalid> wrote:
>> And now I'm pondering what the eventual advent of 64-bit file sizes
>> will do to existing apps and APIs...
> 
> That's a good question.
> 
> It's a pity that on VMS, when using the VMS APIs instead of the C ones,
> you can't just use a 64-bit version of stat() with appropriate 64-bit
> integer variables, compile your code, and then call it a day. :-(
> 
> I wonder if sizes will be locked at the current maximum size for the
> older APIs (with the value varying depending on whether you are working
> in blocks or bytes) with yet _another_ set of APIs to get and manipulate
> the 64-bit file size.
> 
> It's also possible that when using higher-level languages such as C
> with the C APIs they may just do what Linux does and just call
> different versions in the glibc stat() call depending on whether you
> are working with 32-bit or 64-bit variables.
> 
> That might not work however due to the fact that you can have both
> 32-bit and 64-bit pointers in the same image on VMS, unlike the either
> 32-bit or 64-bit pointers seen in Linux binaries.

VMS C stat can switch between 32 and 64 bit st_size just by recompiling
with _LARGEFILE defined.

It is not a problem with mixed 32 and 64 bit pointers as stat is calling
different functions depending on the define.

(DECC$__LONG_GID_STAT and DECC$__OFF64_LONG_GID_STAT)

The VMS API's does not have a 2 GB or 4 GB problem as they
count in blocks not bytes.

So the 32 bit field limit size to 1 TB or 2 TB.

Which is fundamentally the same problem, but in practice a 2 GB
limit is much more problematic than a 1 TB limit.

And since ODS-5 is limited to 1 TB anyway then no bigger files
exist on VMS today.

When we get ODS-n n>5 based on GFS-2 allowing PB and EB
files then some changes will be needed.

Maybe we will have XABFHCL with XAB$Q_EBK and RAB64L with
more RAB$W_RFA.

:-)

> Also, will there need to be another version of RMS indexed files to
> handle the larger file sizes ?

Or maybe they will limit index-sequential files to 1 TB and
say that for >1TB then people have to use SQLite (which
funny enough is currently limited to 256 TB due to 32 bit
page indexes and 64 KB pages).

Arne



More information about the Info-vax mailing list