All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-xfs@vger.kernel.org, david@fromorbit.com,
	fdmanana@kernel.org, linux-fsdevel@vger.kernel.org,
	Jan Kara <jack@suse.cz>,
	djwong@kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: [GIT PULL] vfs: fs freeze fix for 5.10-rc4
Date: Fri, 13 Nov 2020 15:38:47 -0800	[thread overview]
Message-ID: <20201113233847.GG9685@magnolia> (raw)

Hi Linus,

Please pull this branch containing a single vfs fix for 5.10-rc4.  A
very long time ago, a hack was added to the vfs fs freeze protection
code to work around lockdep complaints about XFS, which would try to run
a transaction (which requires intwrite protection) to finalize an xfs
freeze (by which time the vfs had already taken intwrite).

Fast forward a few years, and XFS fixed the recursive intwrite problem
on its own, and the hack became unnecessary.  Fast forward almost a
decade, and latent bugs in the code converting this hack from freeze
flags to freeze locks combine with lockdep bugs to make this reproduce
frequently enough to notice page faults racing with freeze.

Since the hack is unnecessary and causes thread race errors, just get
rid of it completely.  Pushing this kind of vfs change midway through a
cycle makes me nervous, but a large enough number of the usual
VFS/ext4/XFS/btrfs suspects have said this looks good and solves a real
problem vector, so I'm sending this for your consideration instead of
holding off until 5.11.

The branch merges cleanly with upstream as of a few minutes ago, so
please let me know if anything strange happens.

--D

The following changes since commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec:

  Linux 5.10-rc1 (2020-10-25 15:14:11 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.10-fixes-1

for you to fetch changes up to 22843291efc986ce7722610073fcf85a39b4cb13:

  vfs: remove lockdep bogosity in __sb_start_write (2020-11-10 16:49:29 -0800)

----------------------------------------------------------------
VFS fixes for 5.10-rc4:
- Finally remove the "convert to trylock" weirdness in the fs freezer
  code.  It was necessary 10 years ago to deal with nested transactions
  in XFS, but we've long since removed that; and now this is causing
  subtle race conditions when lockdep goes offline and sb_start_* aren't
  prepared to retry a trylock failure.

----------------------------------------------------------------
Darrick J. Wong (1):
      vfs: remove lockdep bogosity in __sb_start_write

 fs/super.c | 33 ++++-----------------------------
 1 file changed, 4 insertions(+), 29 deletions(-)

             reply	other threads:[~2020-11-13 23:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 23:38 Darrick J. Wong [this message]
2020-11-14  0:13 ` [GIT PULL] vfs: fs freeze fix for 5.10-rc4 Linus Torvalds
2020-11-14  0:49   ` Darrick J. Wong
2020-11-14  0:15 ` pr-tracker-bot

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=20201113233847.GG9685@magnolia \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=fdmanana@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.