On 21 February 2018 at 17:11, Christoph Hellwig <h...@infradead.org> wrote: > On Wed, Feb 21, 2018 at 08:51:15AM +1100, Dave Chinner wrote: >> IOWs, if the filesystem is designed with strictly ordered metadata, >> then fsync()ing a new file also implies that all references to the >> new file are also on stable storage because they happened before the >> fsync on the file was issued. i.e. the directory is fsync'd >> implicitly because it was modified by the same operation that >> created the file. Hence if the file creation is made stable, so must >> be the directory modification done during file creation. >> >> This has nothing to do with POSIX or what the "linux standard" is - >> this is testing whether the implementation of strictly ordered >> metadata journalling is correct or not. If gfs2 does not have >> strictly ordered metadata journalling, then it probably shouldn't >> run these tests.... > > Exactly. Also this is not just for new entries but also things like > rename. So trying to come up with some adjocs hacks here seems > wrong. > > That being said as far as I know gfs2 does transactional metadata > updates and has one single global log. Why doesn't it get these > things right by default?
GFS2 does do metadata journaling. I was under the assumption that gfs2's ordering model differs, but it turns out that all that was missing was a log flush in iop->fsync in case the inode is clean but a log flush hasn't been done for it, yet. Thanks, Andreas