Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NFS: report and clear ENOSPC/EFBIG/EDQUOT writeback error on close() …
…file Currently, we report and clear ENOSPC/EFBIG/EDQUOT writeback error on write(), write() file will report unexpected error if previous writeback error have not been cleared. Reproducer: nfs server | nfs client -----------------------------|--------------------------------------------- # No space left on server | fallocate -l 100G /svr/nospc | | mount -t nfs $nfs_server_ip:/ /mnt | | # Expected error: No space left on device | dd if=/dev/zero of=/mnt/file count=1 ibs=10K | | # Release space on mountpoint | rm /mnt/nospc | | # Just write 512B and report unexpected error | dd if=/dev/zero of=/mnt/file count=1 ibs=10K Fix this by clearing ENOSPC/EFBIG/EDQUOT writeback error on close file, it will not clear other errors that are not supposed to be reported by close(). Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
- Loading branch information