[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ye7umfsRLkxAeUEv@mit.edu>
Date: Mon, 24 Jan 2022 13:23:21 -0500
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Lyu Tao <tao.lyu@...l.ch>
Cc: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: How does EXT4 ensures two processes don't modify and synchronize
one page at the same time.
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
Powered by blists - more mailing lists