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

Commit 5681ca40 authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner
Browse files

xfs: Remove icsb infrastructure



Now that the in-core superblock infrastructure has been replaced with
generic per-cpu counters, we don't need it anymore. Nuke it from
orbit so we are sure that it won't haunt us again...

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 0d485ada
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -743,17 +743,15 @@ xfs_initialize_perag_data(
		btree += pag->pagf_btreeblks;
		btree += pag->pagf_btreeblks;
		xfs_perag_put(pag);
		xfs_perag_put(pag);
	}
	}
	/*

	 * Overwrite incore superblock counters with just-read data
	/* Overwrite incore superblock counters with just-read data */
	 */
	spin_lock(&mp->m_sb_lock);
	spin_lock(&mp->m_sb_lock);
	sbp->sb_ifree = ifree;
	sbp->sb_ifree = ifree;
	sbp->sb_icount = ialloc;
	sbp->sb_icount = ialloc;
	sbp->sb_fdblocks = bfree + bfreelst + btree;
	sbp->sb_fdblocks = bfree + bfreelst + btree;
	spin_unlock(&mp->m_sb_lock);
	spin_unlock(&mp->m_sb_lock);


	/* Fixup the per-cpu counters as well. */
	xfs_reinit_percpu_counters(mp);
	xfs_icsb_reinit_counters(mp);


	return 0;
	return 0;
}
}
+0 −2
Original line number Original line Diff line number Diff line
@@ -637,7 +637,6 @@ xfs_fs_counts(
	xfs_mount_t		*mp,
	xfs_mount_t		*mp,
	xfs_fsop_counts_t	*cnt)
	xfs_fsop_counts_t	*cnt)
{
{
	xfs_icsb_sync_counters(mp, XFS_ICSB_LAZY_COUNT);
	cnt->allocino = percpu_counter_read_positive(&mp->m_icount);
	cnt->allocino = percpu_counter_read_positive(&mp->m_icount);
	cnt->freeino = percpu_counter_read_positive(&mp->m_ifree);
	cnt->freeino = percpu_counter_read_positive(&mp->m_ifree);
	cnt->freedata = percpu_counter_read_positive(&mp->m_fdblocks) -
	cnt->freedata = percpu_counter_read_positive(&mp->m_fdblocks) -
@@ -701,7 +700,6 @@ xfs_reserve_blocks(
	 */
	 */
retry:
retry:
	spin_lock(&mp->m_sb_lock);
	spin_lock(&mp->m_sb_lock);
	xfs_icsb_sync_counters_locked(mp, 0);


	/*
	/*
	 * If our previous reservation was larger than the current value,
	 * If our previous reservation was larger than the current value,
+0 −1
Original line number Original line Diff line number Diff line
@@ -460,7 +460,6 @@ xfs_iomap_prealloc_size(
	alloc_blocks = XFS_FILEOFF_MIN(roundup_pow_of_two(MAXEXTLEN),
	alloc_blocks = XFS_FILEOFF_MIN(roundup_pow_of_two(MAXEXTLEN),
				       alloc_blocks);
				       alloc_blocks);


	xfs_icsb_sync_counters(mp, XFS_ICSB_LAZY_COUNT);
	freesp = percpu_counter_read_positive(&mp->m_fdblocks);
	freesp = percpu_counter_read_positive(&mp->m_fdblocks);
	if (freesp < mp->m_low_space[XFS_LOWSP_5_PCNT]) {
	if (freesp < mp->m_low_space[XFS_LOWSP_5_PCNT]) {
		shift = 2;
		shift = 2;
+0 −9
Original line number Original line Diff line number Diff line
@@ -116,15 +116,6 @@ typedef __uint64_t __psunsigned_t;
#undef XFS_NATIVE_HOST
#undef XFS_NATIVE_HOST
#endif
#endif


/*
 * Feature macros (disable/enable)
 */
#ifdef CONFIG_SMP
#define HAVE_PERCPU_SB	/* per cpu superblock counters are a 2.6 feature */
#else
#undef  HAVE_PERCPU_SB	/* per cpu superblock counters are a 2.6 feature */
#endif

#define irix_sgid_inherit	xfs_params.sgid_inherit.val
#define irix_sgid_inherit	xfs_params.sgid_inherit.val
#define irix_symlink_mode	xfs_params.symlink_mode.val
#define irix_symlink_mode	xfs_params.symlink_mode.val
#define xfs_panic_mask		xfs_params.panic_mask.val
#define xfs_panic_mask		xfs_params.panic_mask.val
+2 −2
Original line number Original line Diff line number Diff line
@@ -4463,10 +4463,10 @@ xlog_do_recover(
	xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp));
	xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp));
	ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC);
	ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC);
	ASSERT(xfs_sb_good_version(sbp));
	ASSERT(xfs_sb_good_version(sbp));
	xfs_reinit_percpu_counters(log->l_mp);

	xfs_buf_relse(bp);
	xfs_buf_relse(bp);


	/* We've re-read the superblock so re-initialize per-cpu counters */
	xfs_icsb_reinit_counters(log->l_mp);


	xlog_recover_check_summary(log);
	xlog_recover_check_summary(log);


Loading