summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2022-07-14 11:38:54 +1000
committerDave Chinner <david@fromorbit.com>2022-07-14 11:38:54 +1000
commit4fcc94d653270fcc7800dbaf3b11f78cb462b293 (patch)
tree159a75489e7ad91d14ae8bf0cd4d1fc9496a3bb3 /fs/xfs/xfs_log_recover.c
parenta4454cd69c66bf3e3bbda352b049732f836fc6b2 (diff)
downloadlinux-4fcc94d653270fcc7800dbaf3b11f78cb462b293.tar.bz2
xfs: track the iunlink list pointer in the xfs_inode
Having direct access to the i_next_unlinked pointer in unlinked inodes greatly simplifies the processing of inodes on the unlinked list. We no longer need to look up the inode buffer just to find next inode in the list if the xfs_inode is in memory. These improvements will be realised over upcoming patches as other dependencies on the inode buffer for unlinked list processing are removed. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index bc687459951b..d76e54cbb400 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2673,8 +2673,6 @@ xlog_recover_process_one_iunlink(
xfs_agino_t agino,
int bucket)
{
- struct xfs_buf *ibp;
- struct xfs_dinode *dip;
struct xfs_inode *ip;
xfs_ino_t ino;
int error;
@@ -2684,27 +2682,14 @@ xlog_recover_process_one_iunlink(
if (error)
goto fail;
- /*
- * Get the on disk inode to find the next inode in the bucket.
- */
- error = xfs_imap_to_bp(pag->pag_mount, NULL, &ip->i_imap, &ibp);
- if (error)
- goto fail_iput;
- dip = xfs_buf_offset(ibp, ip->i_imap.im_boffset);
-
xfs_iflags_clear(ip, XFS_IRECOVERY);
ASSERT(VFS_I(ip)->i_nlink == 0);
ASSERT(VFS_I(ip)->i_mode != 0);
- /* setup for the next pass */
- agino = be32_to_cpu(dip->di_next_unlinked);
- xfs_buf_relse(ibp);
-
+ agino = ip->i_next_unlinked;
xfs_irele(ip);
return agino;
- fail_iput:
- xfs_irele(ip);
fail:
/*
* We can't read in the inode this bucket points to, or this inode