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 Sat, 06 Jul 2013, Manuel Bouyer wrote:
> > But I would expect close() to do an implicit fsync() as well, 
> > and return the error if the implicit fsync() didn't succeed (but 
> > still closing the file). As I already mentionned, linux behaves 
> > this way, and I guess applications expects this behavior.
> 
> I would not expect close() to implicitly fsync() the file, and 
> I do not think that NetBSD does so.  If the application wants 
> fsync-like behaviour then I think the application should call 
> fsync().

close(2) on an NFS file system will (should), at the very least,
cause the server to attempt to allocate the specified blocks that
are currently unwritten.  if this fails (for say, quota or disk
full errors), then then only way this is signaled to the
application is via close(2) failure.

in general any application that does not check close(2) for failure
and if present, understand any writes to this file may have failed.
(this is particular relevant for mail servers.)


.mrg.


Home | Main Index | Thread Index | Old Index