Closed nschlia closed 6 years ago
The direct_io option is required if the file size is not known in advance.
direct_io
This option disables the use of page cache (file content cache)
in the kernel for this filesystem. This has several affects:
1. Each read(2) or write(2) system call will initiate one or more
read or write operations, data will not be cached in the kernel.
2. The return value of the read() and write() system calls will
correspond to the return values of the read and write
operations. This is useful for example if the file size is not
known in advance (before reading it)
Fixed.
Note: For older versions (1.1 or older) this can be fixed by specifying the direct_io option on the command line.
When a file is opened for the first time, the resulting file has the wrong size:
When the file is accessed once more (read from cache), the size is correct.