Re: [VFS?] flush-on-close() & close(2) guarantees ?

From: Cyrille Chepelov (home) (chepelov@calixo.net)
Date: Fri Mar 17 2000 - 15:33:17 EST


On Fri, 17 Mar 2000 tytso@mit.edu wrote:

> No, it doesn't. It's not the case for nearly all filesystems (with
> networked filesystems being the notable execption) and for all operating
> systes, including Windblows and other Unix systems.

It seems NetBSD does (not first hand experience, though) (it's actually
a bragging point for some Netbsder's I know -- but that's of epsilon
significance).

close(2)'s manual page (as shipped by Debian) says that " File system
       implementations which use techniques as ``write-behind''
       to increase performance may lead to write(2) succeeding,
       although the data has not been written yet. The error
       status may be reported at a later write operation, but it
       is guaranteed to be reported on closing the file."
Though the code (as per 2.3.51) does exactly that for file systems which
provide f_op->flush(), I was wondering whether fs which write
asynchronously were to be thought as actually doing write-behind or not.
>From your, Jamie and Alan's answers, it seems it's not. Of course
there's fsync() for critical applications.

Thanks for your answers all.

        -- Cyrille

------------------------------------------------------------------------------
Grumpf.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:23 EST