]> git.decadent.org.uk Git - nfs-utils.git/commit
Use __fpurge to ensure single-line writes to cache files
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 26 Jul 2007 20:30:46 +0000 (16:30 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 27 Jul 2007 00:25:52 +0000 (10:25 +1000)
commitdd087896285da9e160e13ee9f7d75381b67895e3
tree23d1a23f6e7c21c64ca4ec7aff0b7913fdfd4ddc
parent525b122699b1b899815a76630ae2ee2feb551fe4
Use __fpurge to ensure single-line writes to cache files

On a recent Debian/Sid machine, I saw libc retrying stdio writes that
returned write errors.  The result is that if an export downcall returns
an error (which it can in normal operation, since it currently
(incorrectly) returns -ENOENT on any negative downcall), then subsequent
downcalls will write multiple lines (including the original line that
received the error).

The result is that the server fails to respond to any rpc call that
refers to an unexported mount point (such as a readdir of a directory
containing such a mountpoint), so client commands hang.

I don't know whether this libc behavior is correct or expected, but it
seems safest to add the __fpurge() (suggested by Neil) to ensure data is
thrown away.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
support/nfs/cacheio.c