From: Christoph Hellwig <hch@infradead.org>
To: Filipe Manana <fdmanana@kernel.org>
Cc: Vyacheslav Kovalevsky <slava.kovalevskiy.2014@gmail.com>,
clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Directory is not persisted after writing to the file within directory if system crashes
Date: Mon, 27 Oct 2025 00:19:32 -0700 [thread overview]
Message-ID: <aP8dBBlWgpGB4OCQ@infradead.org> (raw)
In-Reply-To: <CAL3q7H5ewZROWz0384L_pLvqWrjNK8mX=-kQb26ZDmpAbBUQ4A@mail.gmail.com>
On Sun, Oct 26, 2025 at 09:04:13AM +0000, Filipe Manana wrote:
> >
> > The test itself is quite weird (why would `dir` be gone after seemingly
> > unrelated operation?), any detail can matter.
>
> "dir" should be persisted as well as "dir/file2", according to the
> SOMC (Strictly Ordered Metadata Consistency) that Dave Chinner
> discussed many times in the past in fstests and btrfs mailing lists.
>
> You should also reach the xfs mailing list and mention that
> "dir/file2" is not persisted.
No. The fsync is on the root directory. So the only thing that is
needed to per persisted is transactions touching that. The transaction
to created dir is persisted because it is an entry in the root directly.
creating and writing to file2 has nothing to do with the root directly
and absolutely should not be effected by an fsync on an unrelated inode.
prev parent reply other threads:[~2025-10-27 7:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 15:19 Directory is not persisted after writing to the file within directory if system crashes Vyacheslav Kovalevsky
2025-10-24 16:17 ` Filipe Manana
2025-10-25 9:49 ` Vyacheslav Kovalevsky
2025-10-25 23:40 ` Chris Murphy
2025-10-26 9:04 ` Filipe Manana
2025-10-27 7:19 ` Christoph Hellwig [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=aP8dBBlWgpGB4OCQ@infradead.org \
--to=hch@infradead.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava.kovalevskiy.2014@gmail.com \
/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