> > Use fsync() on the directory.
> >
> > Logical, isn't it?
>
> No. I don't see why I should opendir() a directory, fsync()
> that handle, and closedir() the handle.
And it wouldn't even be enough. Who guarantees you that
the parent directory of this directory has been written
to disk and we won't lose the entry pointing to this
directory on a crash ?
> I would definitely prefer:
>
> lsync(dirpath)
Nice idea. Of course, fsync(file) also has the obligation
to make sure all the metadata of the file is written to
disk. Lots of people seem to be convinced this also includes
the metadata needed to _reach_ the file all the way from the
root of the filesystem...
> I didn't check if POSIX folks have thought of that.
Nice addition. Easier to use than fsync() - no need to
open the file - and probably easier to implement in the
kernel because this way we'll be handing the whole path
to the kernel, whereas fsync() would have the dubious
task of finding out how this file can be traced all the
way down from the root of the filesystem.
regards,
Rik
-- Executive summary of a recent Microsoft press release: "we are concerned about the GNU General Public License (GPL)"
http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/