public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: david@fromorbit.com
Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org
Subject: [GIT PULL v2 15/22] xfs: fix iget/irele usage in online fsck
Date: Wed, 12 Apr 2023 17:53:19 -0700	[thread overview]
Message-ID: <20230413005319.GU360889@frogsfrogsfrogs> (raw)
In-Reply-To: <168127095149.417736.13949355066335699103.stg-ugh@frogsfrogsfrogs>

Hi Dave,

Please pull this branch with changes for xfs.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.

--D

The following changes since commit 0916056eba4fd816f8042a3960597c316ea10256:

xfs: fix parent pointer scrub racing with subdirectory reparenting (2023-04-11 19:00:20 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-iget-fixes-6.4_2023-04-12

for you to fetch changes up to 1fc7a0597d237c17b6501f8c33b76d3eaaae9079:

xfs: don't take the MMAPLOCK when scrubbing file metadata (2023-04-11 19:00:22 -0700)

----------------------------------------------------------------
xfs: fix iget/irele usage in online fsck [v24.5]

This patchset fixes a handful of problems relating to how we get and
release incore inodes in the online scrub code.  The first patch fixes
how we handle DONTCACHE -- our reasons for setting (or clearing it)
depend entirely on the runtime environment at irele time.  Hence we can
refactor iget and irele to use our own wrappers that set that context
appropriately.

The second patch fixes a race between the iget call in the inode core
scrubber and other writer threads that are allocating or freeing inodes
in the same AG by changing the behavior of xchk_iget (and the inode core
scrub setup function) to return either an incore inode or the AGI buffer
so that we can be sure that the inode cannot disappear on us.

The final patch elides MMAPLOCK from scrub paths when possible.  It did
not fit anywhere else.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>

----------------------------------------------------------------
Darrick J. Wong (5):
xfs: manage inode DONTCACHE status at irele time
xfs: fix an inode lookup race in xchk_get_inode
xfs: rename xchk_get_inode -> xchk_iget_for_scrubbing
xfs: retain the AGI when we can't iget an inode to scrub the core
xfs: don't take the MMAPLOCK when scrubbing file metadata

fs/xfs/scrub/bmap.c   |   9 +-
fs/xfs/scrub/common.c | 306 +++++++++++++++++++++++++++++++++++++++++---------
fs/xfs/scrub/common.h |  10 +-
fs/xfs/scrub/dir.c    |  14 +--
fs/xfs/scrub/inode.c  | 191 ++++++++++++++++++++++++++-----
fs/xfs/scrub/parent.c |  13 +--
fs/xfs/scrub/scrub.c  |   2 +-
fs/xfs/xfs_icache.c   |   3 +-
fs/xfs/xfs_icache.h   |  11 +-
9 files changed, 448 insertions(+), 111 deletions(-)


      reply	other threads:[~2023-04-13  0:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12  3:48 [GIT PULL 15/22] xfs: fix iget usage in directory scrub Darrick J. Wong
2023-04-13  0:53 ` Darrick J. Wong [this message]

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=20230413005319.GU360889@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=linux-xfs@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