Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

14 Porting Applications to Support Large OSS Files
This chapter describes changing an application to support OSS files larger than approximately
2 gigabytes on systems running G06.29 and later G-series RVUs, H06.06 and later H-series RVUs,
and J-series RVUs.
For RVUs earlier than H06.06 and G06.29, OSS files always had an underlying Guardian file
format of Format 1 and were limited in size to approximately 2 gigabytes. This size limitation was
a direct result of using 32-bit data types for file sizes and offsets. For J-series RVUs, H06.06 and
later RVUs, and G06.29 and later G-series RVUs, 64-bit data types and offsets can be used, and
OSS files are either small files or large files:
Small files have these characteristics:
Have an underlying Guardian file format of either Format 1 or Format 2. This underlying file
format is normally not visible to customer applications.
Have a size limit of approximately 2 gigabytes when opened or created using a 32-bit API.
For information about the exact size limits, see the Open System Services Management and
Operations Guide.
Can be accessed using the existing 32-bit application programmatic interfaces (APIs) such as
creat() and open() without changes to your application code.
Can be accessed by 64-bit APIs such as creat64() and open64(). If the file is accessed
using a 64-bit API:
The file is automatically converted to use an underlying Guardian file format of Format 2.
The file no longer has a size limit of approximately 2 gigabytes. It can grow to the size
limit for large files.
Can be moved, copied, or restored to systems running RVUs that do not support OSS large
files. In such cases, if the file has an underlying Guardian file format of Format 2 but a size
of less than approximately 2 gigabytes:
The file is automatically converted to use an underlying Guardian format of Format 1.
The file becomes subject to the file size limit of approximately 2 gigabytes.
Large files have these characteristics:
Are larger than approximately 2 gigabytes.
Have a size limit of approximately 1 terabyte, constrained by the space available on the disk
volume. For information about the exact size limits, see the Open System Services Management
and Operations Guide.
NOTE: For J-series RVUs, H06.06 and later RVUs, and G06.29 and later G-series RVUs, a
pax archive file is limited to 8 gigabytes.
Have an underlying Guardian file format of Format 2. This underlying file format is normally
not visible to customer applications when OSS APIs are used, but might be affected when
Guardian APIs are used. For more information, see the Open System Services Programmer’s
Guide.
Can be accessed using only 64-bit APIs such as creat64() and open64() .
Cannot be restored to systems running RVUs that do not support OSS files larger than
approximately 2 gigabytes.
If OSS APIs are used, large files cannot be accessed from systems running RVUs that do not
support OSS files larger than approximately 2 gigabytes. However, Guardian Enscribe APIs
with 64-bit elections can access these files.
190 Porting Applications to Support Large OSS Files