From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Lyu Tao <tao.lyu@epfl.ch>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: How does EXT4 ensures two processes don't modify and synchronize one page at the same time.
Date: Mon, 24 Jan 2022 13:23:21 -0500 [thread overview]
Message-ID: <Ye7umfsRLkxAeUEv@mit.edu> (raw)
In-Reply-To: <6fdeab9535134fc18e86968b10e726c6@epfl.ch>
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
prev parent reply other threads:[~2022-01-24 18:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 17:17 How does EXT4 ensures two processes don't modify and synchronize one page at the same time Lyu Tao
2022-01-24 18:23 ` Theodore Y. Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ye7umfsRLkxAeUEv@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=tao.lyu@epfl.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox