Subject: Re: [Fwd: Re: SOFTDEPS safe for qmail?]
To: Robert Elz <kre@munnari.OZ.AU>
From: None <witek@pd37.warszawa.sdi.tpnet.pl>
List: current-users
Date: 06/17/2000 21:44:09
On 17-Jun-00, 18:13:31 Robert Elz wrote:

>  
>  To those who care (NetBSD people), fsync(2) should probably be updated,
>  so it is made clear just what is being done (in my book at least, file
>  names are not attributes of a file descriptor..., let alone the rest of the
>  directory tree).   More than just for accuracy of the documentation,
>  this is important as a reminder to those who come after of just what
>  they have to maintain.



Standards - SUSv2:

        The fsync() function forces all currently queued I/O operations
        associated with the file indicated by file descriptor fildes to the
        synchronised I/O completion state. All I/O operations are completed as
        defined for synchronised I/O file integrity completion.

and
        synchronised I/O file integrity completion - Identical to a
        synchronised I/O data integrity completion with the addition that all
        file attributes relative to the I/O operation (including access time,
        modification time, status change time) will be successfully transferred
        prior to returning to the calling process.

and
        synchronised I/O data integrity completion - [...] The write is complete
        only when the data specified in the write request is successfully
        transferred and all file system information required to retrieve the
        data is successfully transferred.

"all file system information required to retrieve the data" suggests
that both directory entry and all directories above should be updated.


        Witold J. Wnuk