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 Tue, Jul 02, 2013 at 09:47:18AM +0200, Manuel Bouyer wrote:
> On Mon, Jul 01, 2013 at 10:45:27PM +0100, David Laight wrote:
> > On Fri, Jun 28, 2013 at 02:44:46PM +0200, Edgar Fu? wrote:
> > > On an NFS-mounted file system, when you try to write to a file and are
> > > over-quota, the write() succeeds, but a following fsync() or close()
> > > fails.
> >
> > close() shouldn't fail either.
>
> it should if there's no fsync() before
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().
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index