NFS performance: a question

Ed Gould ed at mtxinu.UUCP
Tue Feb 16 05:01:14 AEST 1988


In article <41894 at sun.uucp> guy at gorodish.Sun.COM (Guy Harris) writes:
>... when doing NFS writes, "out of space" errors are not synchronously
>reported.  A program should probably do an "fsync" after writing out a
>lot of data, and check the return code from "fsync", so that it can
>find out about such errors and report them to the user.

The return value from close() will also report the error code, so the
fsync() is not necessary in all cases.  It's necessary only if the program
wishes to check for errors but not close the file.

Note that there are errors that can occur on local filesystems that may
not be reported synchronously either.  Usually, these are hardware
errors (not software-only things like "out of space").  In fact, they
may not be reported to the user program at all.

Moral:  Check for and report errors from *all* system calls.

-- 
Ed Gould                    mt Xinu, 2560 Ninth St., Berkeley, CA  94710  USA
{ucbvax,uunet}!mtxinu!ed    +1 415 644 0146

"`She's smart, for a woman, wonder how she got that way'..."



More information about the Comp.unix.wizards mailing list