Hi, On Fri, 2006-05-19 at 21:27 +0200, Martin Jambor wrote: > The problem is that we require sync_fs() super operation to be the > last executed part of the sys_sync() syscall implementation. In other > words, we need all inodes to be written before sync_fs() is called. You can't really ever guarantee that. > What is more, I regularly encounter a situation when a part of a > directory operation (usually the directory) is written before > sync_fs() is called and the second part (a new inode, for example) > afterwards. This means that the filesystem is only half-synced and > also in an inconsistent state. Right. There's nothing at all to synchronise sync() with ongoing filesystem operations. If you're renaming a file from one directory to another, there's nothing in the VFS to keep both of those directory updates in a single sync. Simply syncing the superblock last won't cure this, either. There's nothing to stop new modifications to the filesystem between the inode writes and the sync_fs(), so the superblock may still be out of sync with the inodes by the time you reach the sync_fs(). If you want to guarantee consistency on disk at all times, you really need to provide that atomicity within your filesystem itself. Cheers, Stephen - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html