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 Fri, Jul 05, 2013 at 10:22:48PM +0100, David Laight wrote:
> Not according to 'man 2 close'.
> That only allows EBADF and EINTR (presumably for blocking close on
> character devices, sockets and? pipes).
>
> Most programs wouldn't want an fd left open just because a file was NFS
> and a write generated by close failed.
>
> This ought to be similar to what happens with stdio buffering.
> Where, if you wan't to know whether the writes actually completed,
> you have to call fflush() and ferror() prior to fclose().
one difference here is that, on a local filesystem, write()
can return immediatly EDQUOT, even if the write would be buffered
otherwise.
With NFS, write() can't return EDQUOT unless the write is synchronous.
per the man page, fsync() isn't allowed to return EDQUOT either.
Note that on linux, close() will return EDQUOT if a pending NFS
write fails with EDQUOT, so my guess is that applications who
cares about this already check close() return value.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index