Dataloss on NFS-clients who modify an mmap()'d area after closing the file-descriptor
Issue
When an application on an NFS-client (tested with NFSv3) executes the following steps, data written after the close() is never flushed to the server:
open()
mmap()
close()
- <modify data in the mmap'ed area>
munmap()
Dropping the caches (via /proc/sys/vm/drop_caches
) or unmounting does not result in the data being sent to the server.
The man-page for mmap()
(man 2 mmap
) does mention that closing the file-descriptor does not munmap()
the area. Using the mmap'ed area after a close()
seems valid (although it is bad practice).
Environment
- Red Hat Enterprise Linux 5.8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.