* [GIT PULL 13/22] xfs: fix iget/irele usage in online fsck
@ 2023-04-12 3:48 Darrick J. Wong
2023-04-13 0:49 ` [GIT PULL 13/22] xfs: fix iget usage in directory scrub Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2023-04-12 3:48 UTC (permalink / raw)
To: dchinner, djwong; +Cc: dchinner, hch, linux-xfs
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 30f8ee5e7e0ccce396dff209c6cbce49d0d7e167:
xfs: ensure that single-owner file blocks are not owned by others (2023-04-11 19:00:16 -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-11
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 (12):
xfs: use the directory name hash function for dir scrubbing
xfs: streamline the directory iteration code for scrub
xfs: xfs_iget in the directory scrubber needs to use UNTRUSTED
xfs: always check the existence of a dirent's child inode
xfs: remove xchk_parent_count_parent_dentries
xfs: simplify xchk_parent_validate
xfs: fix parent pointer scrub racing with subdirectory reparenting
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/Makefile | 1 +
fs/xfs/scrub/bmap.c | 9 +-
fs/xfs/scrub/common.c | 328 ++++++++++++++++++++++++++++++++----------
fs/xfs/scrub/common.h | 11 +-
fs/xfs/scrub/dir.c | 240 ++++++++++---------------------
fs/xfs/scrub/inode.c | 191 +++++++++++++++++++++----
fs/xfs/scrub/parent.c | 308 +++++++++++++---------------------------
fs/xfs/scrub/readdir.c | 375 +++++++++++++++++++++++++++++++++++++++++++++++++
fs/xfs/scrub/readdir.h | 19 +++
fs/xfs/scrub/scrub.c | 2 +-
fs/xfs/xfs_icache.c | 3 +-
fs/xfs/xfs_icache.h | 11 +-
12 files changed, 1009 insertions(+), 489 deletions(-)
create mode 100644 fs/xfs/scrub/readdir.c
create mode 100644 fs/xfs/scrub/readdir.h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [GIT PULL 13/22] xfs: fix iget usage in directory scrub
2023-04-12 3:48 [GIT PULL 13/22] xfs: fix iget/irele usage in online fsck Darrick J. Wong
@ 2023-04-13 0:49 ` Darrick J. Wong
2023-04-13 0:51 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2023-04-13 0:49 UTC (permalink / raw)
To: david; +Cc: dchinner, hch, linux-xfs
Hi Dave,
Please pull this branch with changes for xfs. My topic branch
management scripts neglected to ensure that the pull requests were
sorted in patch order, hence the order is wrong and the pull requests
are empty because I must have reshuffled the stgit patches and forgot to
update the topic guide file. Sigh. I hate how maintainers have to
build basic patch management and CI s*****themselves**.
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 30f8ee5e7e0ccce396dff209c6cbce49d0d7e167:
xfs: ensure that single-owner file blocks are not owned by others (2023-04-11 19:00:16 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-dir-iget-fixes-6.4_2023-04-12
for you to fetch changes up to 6bb9209ceebb07fd07cec25af04eed1809c654de:
xfs: always check the existence of a dirent's child inode (2023-04-11 19:00:18 -0700)
----------------------------------------------------------------
xfs: fix iget usage in directory scrub [v24.5]
In this series, we fix some problems with how the directory scrubber
grabs child inodes. First, we want to reduce EDEADLOCK returns by
replacing fixed-iteration loops with interruptible trylock loops.
Second, we add UNTRUSTED to the child iget call so that we can detect a
dirent that points to an unallocated inode. Third, we fix a bug where
we weren't checking the inode pointed to by dotdot entries at all.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
----------------------------------------------------------------
Darrick J. Wong (4):
xfs: use the directory name hash function for dir scrubbing
xfs: streamline the directory iteration code for scrub
xfs: xfs_iget in the directory scrubber needs to use UNTRUSTED
xfs: always check the existence of a dirent's child inode
fs/xfs/Makefile | 1 +
fs/xfs/scrub/dir.c | 246 +++++++++++---------------------
fs/xfs/scrub/parent.c | 73 +++-------
fs/xfs/scrub/readdir.c | 375 +++++++++++++++++++++++++++++++++++++++++++++++++
fs/xfs/scrub/readdir.h | 19 +++
5 files changed, 497 insertions(+), 217 deletions(-)
create mode 100644 fs/xfs/scrub/readdir.c
create mode 100644 fs/xfs/scrub/readdir.h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [GIT PULL 13/22] xfs: fix iget usage in directory scrub
2023-04-13 0:49 ` [GIT PULL 13/22] xfs: fix iget usage in directory scrub Darrick J. Wong
@ 2023-04-13 0:51 ` Darrick J. Wong
0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2023-04-13 0:51 UTC (permalink / raw)
To: david; +Cc: dchinner, hch, linux-xfs
...and of course this was supposed to be tagged v2 but I got distracted
because I'm editing pull requests by hand to try to make threading work
properlyish even though the order of the pull requests has changed and
FML.
--D
On Wed, Apr 12, 2023 at 05:49:26PM -0700, Darrick J. Wong wrote:
> Hi Dave,
>
> Please pull this branch with changes for xfs. My topic branch
> management scripts neglected to ensure that the pull requests were
> sorted in patch order, hence the order is wrong and the pull requests
> are empty because I must have reshuffled the stgit patches and forgot to
> update the topic guide file. Sigh. I hate how maintainers have to
> build basic patch management and CI s*****themselves**.
>
> 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 30f8ee5e7e0ccce396dff209c6cbce49d0d7e167:
>
> xfs: ensure that single-owner file blocks are not owned by others (2023-04-11 19:00:16 -0700)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-dir-iget-fixes-6.4_2023-04-12
>
> for you to fetch changes up to 6bb9209ceebb07fd07cec25af04eed1809c654de:
>
> xfs: always check the existence of a dirent's child inode (2023-04-11 19:00:18 -0700)
>
> ----------------------------------------------------------------
> xfs: fix iget usage in directory scrub [v24.5]
>
> In this series, we fix some problems with how the directory scrubber
> grabs child inodes. First, we want to reduce EDEADLOCK returns by
> replacing fixed-iteration loops with interruptible trylock loops.
> Second, we add UNTRUSTED to the child iget call so that we can detect a
> dirent that points to an unallocated inode. Third, we fix a bug where
> we weren't checking the inode pointed to by dotdot entries at all.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
>
> ----------------------------------------------------------------
> Darrick J. Wong (4):
> xfs: use the directory name hash function for dir scrubbing
> xfs: streamline the directory iteration code for scrub
> xfs: xfs_iget in the directory scrubber needs to use UNTRUSTED
> xfs: always check the existence of a dirent's child inode
>
> fs/xfs/Makefile | 1 +
> fs/xfs/scrub/dir.c | 246 +++++++++++---------------------
> fs/xfs/scrub/parent.c | 73 +++-------
> fs/xfs/scrub/readdir.c | 375 +++++++++++++++++++++++++++++++++++++++++++++++++
> fs/xfs/scrub/readdir.h | 19 +++
> 5 files changed, 497 insertions(+), 217 deletions(-)
> create mode 100644 fs/xfs/scrub/readdir.c
> create mode 100644 fs/xfs/scrub/readdir.h
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-13 0:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 3:48 [GIT PULL 13/22] xfs: fix iget/irele usage in online fsck Darrick J. Wong
2023-04-13 0:49 ` [GIT PULL 13/22] xfs: fix iget usage in directory scrub Darrick J. Wong
2023-04-13 0:51 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox