Re: [PATCH 1/1] xfs: make xchk_iget safer in the presence of corrupt inode btrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, Sep 26, 2023 at 04:31:07PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> When scrub is trying to iget na inode, ensure that it won't end up
> deadlocked on a cycle in the inode btree by using an empty transaction
> to store all the buffers.
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/scrub/common.c |    6 ++++--
>  fs/xfs/scrub/common.h |   19 +++++++++++++++++++
>  fs/xfs/scrub/inode.c  |    4 ++--
>  3 files changed, 25 insertions(+), 4 deletions(-)

Looks reasonable.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Further question on loops in btrees because I can't remember if this
case is handled: if the loop goes round and round the same level,
how is that detected? i.e. how do we avoid recursion count overflows
if we keep walking over the same sibling block pattern?

Dave Chinner

[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]

  Powered by Linux