truncate() syscall against EFBIG errno issue over nfs filesystem
Subsystems (2)
Hi guys,
In LTP truncate03 testcase (https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/truncate/truncate03.c),the sub-test which test the EFBUG errno will fail. The test want to truncate the testfile to twice of the RLIMIT_FSIZE size.
According to the man page:RLIMIT_FSIZE
The maximum size of files that the process may create.
Attempts to extend a file beyond this limit result in delivery of a
SIGXFSZ signal. By default, this signal terminates a
process, but a process can catch this signal instead, in which case the
relevant system call (e.g., write(2), truncate(2)) fails
with the error EFBIG.
We can get EFBIG on some other filesystem such like ext4,xfs.
But truncate will succeed unexpectedly if the testfile on nfs filesystem after catch the SIGXFSZ signal. I'm not sure if it is a bug for truncate(2) on nfs,or expected behavior?
Could someone help to have a look?
Thanks
Shuang