linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ext4: Fix possible fs corruption due to xattr races
@ 2022-06-06 14:28 Jan Kara
  2022-06-06 14:28 ` [PATCH 1/2] mbcache: Add functions to invalidate entries and wait for entry users Jan Kara
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jan Kara @ 2022-06-06 14:28 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Ritesh Harjani, Jan Kara

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-08 15:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 0/2] ext4: Fix possible fs corruption due to xattr races Lukas Czerner
2022-06-08  4:51 ` Ritesh Harjani
2022-06-08  9:54   ` Jan Kara
2022-06-08 15:02     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).