Is there any limitation on "open" based on file size. ? My file size is 2 GB will it open successfully and is there any timing issue can come ? filesystem is rootfs.
From the open
man page:
O_LARGEFILE
(LFS) Allow files whose sizes cannot be represented in an
off_t
(but can be represented in anoff64_t
) to be opened. The_LARGEFILE64_SOURCE
macro must be defined in order to obtain this definition. Setting the_FILE_OFFSET_BITS
feature test macro to 64 (rather than usingO_LARGEFILE
) is the preferred method of obtaining method of accessing large files on 32-bit systems (seefeature_test_macros
(7)).
On a 64-bit system, off_t
will be 64 bits and you'll have no problem. On a 32-bit system, you'll need the suggested workaround to allow for files larger than 2 GB.
rootfs may not support large files; consider using a proper filesystem instead (tmpfs is almost the same as rootfs, but with more features).
rootfs is intended only for booting and early use.