Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: Ted Tso <tytso@mit.edu>,
	linux-ext4@vger.kernel.org,
	Ritesh Harjani <ritesh.list@gmail.com>
Subject: Re: [PATCH 0/2] ext4: Fix possible fs corruption due to xattr races
Date: Tue, 7 Jun 2022 14:22:36 +0200	[thread overview]
Message-ID: <20220607122236.3anpsbtsw3vjyuy5@fedora> (raw)
In-Reply-To: <20220606142215.17962-1-jack@suse.cz>

On Mon, Jun 06, 2022 at 04:28:45PM +0200, Jan Kara wrote:
> Hello,
> 
> I've tracked down the culprit of the jbd2 assertion Ritesh reported to me. In
> the end it does not have much to do with jbd2 but rather points to a subtle
> race in xattr code between xattr block reuse and xattr block freeing that can
> result in fs corruption during journal replay. See patch 2/2 for more details.
> These patches fix the problem. I have to say I'm not too happy with the special
> mbcache interface I had to add because it just requires too deep knowledge of
> how things work internally to get things right. If you get it wrong, you'll
> have subtle races like above. But I didn't find a more transparent way to
> fix this race. If someone has ideas, suggestions are welcome!
> 
> 								Honza

I haven't give too much thought towards finding a better way to fix the
race, but this seems like ok solution to me.

You can add to the series

Reviewed-by: Lukas Czerner <lczerner@redhat.com>


  parent reply	other threads:[~2022-06-07 12:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 14:28 [PATCH 0/2] ext4: Fix possible fs corruption due to xattr races Jan Kara
2022-06-06 14:28 ` [PATCH 1/2] mbcache: Add functions to invalidate entries and wait for entry users Jan Kara
2022-06-06 14:28 ` [PATCH 2/2] ext4: Fix race when reusing xattr blocks Jan Kara
2022-06-07 12:22 ` Lukas Czerner [this message]
2022-06-08  4:51 ` [PATCH 0/2] ext4: Fix possible fs corruption due to xattr races Ritesh Harjani
2022-06-08  9:54   ` Jan Kara
2022-06-08 15:02     ` Jan Kara

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=20220607122236.3anpsbtsw3vjyuy5@fedora \
    --to=lczerner@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    /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