tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NFS over-quota not detected if utimes() called before fsync()/close()

On Sun, Jul 07, 2013 at 10:18:29AM -0700, Erik Fair wrote:
> The problem of close(2) returning an "unexpected" error showed up in the 
> original Andrew Filesystem (AFS) papers from CMU, too - AFS syncs on close, 
> which can fail, but they found most applications not checking the return code 
> from close(2).

Yes, it's the same issue as NFS: write(2) can't return the error, unless
it really does the write (in this case the writes are synchrounous).
If you want to buffer writes, the overquota condition is detected
only when the write really occurs, at which time the kernel may not have
a way to report the problem to the app. What the kernel can do in this case
is remember the condition and signal it to the application at fsync() or
close() time.

Now I suspect that indeed, some applications don't check the return value
of close(). But I suspect that because of the linux NFS behavior,
things have changed since the AFP papers.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index