diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-08-10 07:48:03 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-08-10 07:48:03 -0700 |
commit | 9ed851f695c71d325758f8c18e265da9316afd26 (patch) | |
tree | ea61f9dc00cbbc923eb71f0a7c5f3506e64f2b4f /arch | |
parent | 77a1396f9ff112d71460edc43d74a019ba420979 (diff) | |
download | lwn-9ed851f695c71d325758f8c18e265da9316afd26.tar.gz lwn-9ed851f695c71d325758f8c18e265da9316afd26.zip |
xfs: allow scanning ranges of the buffer cache for live buffers
After an online repair, we need to invalidate buffers representing the
blocks from the old metadata that we're replacing. It's possible that
parts of a tree that were previously cached in memory are no longer
accessible due to media failure or other corruption on interior nodes,
so repair figures out the old blocks from the reverse mapping data and
scans the buffer cache directly.
In other words, online fsck needs to find all the live (i.e. non-stale)
buffers for a range of fsblocks so that it can invalidate them.
Unfortunately, the current buffer cache code triggers asserts if the
rhashtable lookup finds a non-stale buffer of a different length than
the key we searched for. For regular operation this is desirable, but
for this repair procedure, we don't care since we're going to forcibly
stale the buffer anyway. Add an internal lookup flag to avoid the
assert. Skip buffers that are already XBF_STALE.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions