Linux-ext4 Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 23:56 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

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git