linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Costa Sapuntzakis <costa@purestorage.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [BUG] invalid superblock checksum possibly due to race
Date: Tue, 30 Jun 2020 11:34:49 -0700	[thread overview]
Message-ID: <CAABuPhZrQXQ8-tFu9V3575by5N3RV7jd-OcOjy_pLw_na1OUkw@mail.gmail.com> (raw)
In-Reply-To: <20200630114832.GA16372@quack2.suse.cz>

Hello and thank you!

> Yes, probably ext4_superblock_csum_set() should use
>
> lock_buffer(EXT4_SB(sb)->s_sbh)
>
> to synchronize updating of superblock checksum. Will you send a patch?

Yes. I will send a patch.

I noticed lock_buffer can sleep. That would seem to imply to me that
lock_buffer can be held across I/Os.
I worry that this will occasionally significantly slow down this code
path compared to what it used to be.  Are there any things
about the way ext4 uses buffers that makes this less of a concern?

-Costa

  reply	other threads:[~2020-06-30 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 23:56 [BUG] invalid superblock checksum possibly due to race Costa Sapuntzakis
2020-06-30 11:48 ` Jan Kara
2020-06-30 18:34   ` Costa Sapuntzakis [this message]
2020-07-01 16:22     ` 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=CAABuPhZrQXQ8-tFu9V3575by5N3RV7jd-OcOjy_pLw_na1OUkw@mail.gmail.com \
    --to=costa@purestorage.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).