On Mon, Jan 24, 2022 at 05:17:34PM +0000, Lyu Tao wrote: > > I'm new to file system area and have a naive question about the global sync. > > Let's suppose there are two process are writing to the same file. If > one process issues a sync() syscall, which mechanism can ensures the > two processes don't modify and synchronize one page at the same > time. That's not what the sync() system call purports to do. To quote from the sync(2) man page: sync() causes all pending modifications to filesystem metadata and cached file data to be written to the underlying filesystems. - Ted