Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11654513 authored by David Chinner's avatar David Chinner Committed by Lachlan McIlroy
Browse files

[XFS] kill deleted inodes list



Now that the deleted inodes list is unused, kill it. This also removes the
i_reclaim list head from the xfs_inode, shrinking it by two pointers.

SGI-PV: 988142

SGI-Modid: xfs-linux-melb:xfs-kern:32334a

Signed-off-by: default avatarDavid Chinner <david@fromorbit.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
parent 7a3be02b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -913,7 +913,6 @@ xfs_fs_inode_init_once(
	atomic_set(&ip->i_iocount, 0);
	atomic_set(&ip->i_pincount, 0);
	spin_lock_init(&ip->i_flags_lock);
	INIT_LIST_HEAD(&ip->i_reclaim);
	init_waitqueue_head(&ip->i_ipin_wait);
	/*
	 * Because we want to use a counting completion, complete
@@ -1546,7 +1545,6 @@ xfs_fs_fill_super(
		goto out_free_args;

	spin_lock_init(&mp->m_sb_lock);
	mutex_init(&mp->m_ilock);
	mutex_init(&mp->m_growlock);
	atomic_set(&mp->m_active_trans, 0);
	INIT_LIST_HEAD(&mp->m_sync_list);
+6 −0
Original line number Diff line number Diff line
@@ -644,6 +644,11 @@ xfs_reclaim_inode(
	return 0;
}

/*
 * We set the inode flag atomically with the radix tree tag.
 * Once we get tag lookups on the radix tree, this inode flag
 * can go away.
 */
void
xfs_inode_set_reclaim_tag(
	xfs_inode_t	*ip)
@@ -655,6 +660,7 @@ xfs_inode_set_reclaim_tag(
	spin_lock(&ip->i_flags_lock);
	radix_tree_tag_set(&pag->pag_ici_root,
			XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG);
	__xfs_iflags_set(ip, XFS_IRECLAIMABLE);
	spin_unlock(&ip->i_flags_lock);
	read_unlock(&pag->pag_ici_lock);
	xfs_put_perag(mp, pag);
+0 −8
Original line number Diff line number Diff line
@@ -95,10 +95,6 @@ xfs_iget_cache_hit(
		/* clear the radix tree reclaim flag as well. */
		__xfs_inode_clear_reclaim_tag(mp, pag, ip);
		read_unlock(&pag->pag_ici_lock);

		XFS_MOUNT_ILOCK(mp);
		list_del_init(&ip->i_reclaim);
		XFS_MOUNT_IUNLOCK(mp);
	} else if (!igrab(VFS_I(ip))) {
		/* If the VFS inode is being torn down, pause and try again. */
		error = EAGAIN;
@@ -419,11 +415,7 @@ xfs_iextract(
	write_unlock(&pag->pag_ici_lock);
	xfs_put_perag(mp, pag);

	/* Deal with the deleted inodes list */
	XFS_MOUNT_ILOCK(mp);
	list_del_init(&ip->i_reclaim);
	mp->m_ireclaims++;
	XFS_MOUNT_IUNLOCK(mp);
}

/*
+2 −2
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ xfs_inode_alloc(
	ASSERT(atomic_read(&ip->i_iocount) == 0);
	ASSERT(atomic_read(&ip->i_pincount) == 0);
	ASSERT(!spin_is_locked(&ip->i_flags_lock));
	ASSERT(list_empty(&ip->i_reclaim));
	ASSERT(completion_done(&ip->i_flush));

	/*
	 * initialise the VFS inode here to get failures
@@ -2729,7 +2729,7 @@ xfs_idestroy(
	ASSERT(atomic_read(&ip->i_iocount) == 0);
	ASSERT(atomic_read(&ip->i_pincount) == 0);
	ASSERT(!spin_is_locked(&ip->i_flags_lock));
	ASSERT(list_empty(&ip->i_reclaim));
	ASSERT(completion_done(&ip->i_flush));
	kmem_zone_free(xfs_inode_zone, ip);
}

+0 −1
Original line number Diff line number Diff line
@@ -235,7 +235,6 @@ typedef struct dm_attrs_s {
typedef struct xfs_inode {
	/* Inode linking and identification information. */
	struct xfs_mount	*i_mount;	/* fs mount struct ptr */
	struct list_head	i_reclaim;	/* reclaim list */
	struct xfs_dquot	*i_udquot;	/* user dquot */
	struct xfs_dquot	*i_gdquot;	/* group dquot */

Loading