This is the mail archive of the
mailing list for the glibc project.
Re: aio_fsync() a directory ?
- From: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: kosaki dot motohiro at gmail dot com
- Date: Tue, 12 Mar 2013 16:47:38 -0400
- Subject: Re: aio_fsync() a directory ?
- References: <513EEF07.email@example.com>
(3/12/13 5:01 AM), Xavier Roche wrote:
> Hi folks!
> As a followup to a discussion
> regarding synchronization of file operations (file creation, renaming,
> symlink, etc.), it seems that the only way to "commit" a filename change
> is to open() the containing directory in O_RDONLY, and fsync() the given
> file descriptor.
This is right from POSIX POV.
However, at least, ext4 and btrfs have a guarantee to commit when renaming.
Because kernel developers know that many application developers don't use fsync().
See below blog post and related discussions.
Sorry for the offtopic.