Open System Services Programmer's Guide
execution when Guardian APIs are used. For more information, see “Compatibility Issue For
Guardian Files Created by OSS APIs” (page 82)
• Can be accessed using 64-bit APIs such as creat64() and open64() only:
An application can explicitly call the 64-bit version of a function when you use the
#define _LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler
command option to compile the application.
◦
◦ An application call to interface() is automatically mapped to the interface64()
function when you use the #define _FILE_OFFSET_BITS 64 feature test macro or
an equivalent compiler command option to compile the application
• Cannot be restored to systems running RVUs that do not support OSS files larger than
approximately 2 GB.
• If OSS APIs are used, large files cannot be accessed from systems running RVUs that do not
support OSS files larger than approximately 2 GB. However, Guardian Enscribe APIs with
64-bit elections can access these files.
Large File Safe (LFS) Applications and Large File Aware (LFA) Appications
An application that is large OSS file safe (LFS) causes no data loss or corruption when it encounters
an OSS file larger than approximately 2 GB. It can not process OSS files larger than approximately
2 GB, but it has the appropriate logic to handle errors or warnings detected during file manipulation
operations and fail gracefully.
An application that is large OSS file aware (LFA) can process OSS files larger than approximately
2 GB with the same functionality as processing OSS files smaller than approximately 2 GB. Such
an application can handle large files as input and generate large files as output. Applications that
are large file aware can also process small files.
Large File Safe APIs
For J-series RVUs, H06.06 and later H-series RVUs, and G06.29 and later G-series RVUS, existing
I/O APIs are modified to fail safely on OSS files larger than approximately 2 GB. These APIs return
an error (EOVERFLOW or EFBIG) when an action cannot be performed on OSS files larger than
approximately 2 GB or an attribute cannot be represented for such a file.
The existing 32-bit I/O APIs modified to be large file safe include:
creat()
open()
ftruncate()
lseek()
fstat()
lstat()
stat()
fstatvfs()
statvfs()
ftw()
nftw()
Other existing I/O APIs modified to be large file safe include:
read()
readv()
write()
writev()
readdir()
fcntl()
Accessing OSS Files Larger Than 2 GB 79