diff options
Diffstat (limited to 'fs/xfs/scrub/rtbitmap.c')
| -rw-r--r-- | fs/xfs/scrub/rtbitmap.c | 48 | 
1 files changed, 6 insertions, 42 deletions
diff --git a/fs/xfs/scrub/rtbitmap.c b/fs/xfs/scrub/rtbitmap.c index e7dace7b4be8..008ddb599e13 100644 --- a/fs/xfs/scrub/rtbitmap.c +++ b/fs/xfs/scrub/rtbitmap.c @@ -19,19 +19,20 @@  /* Set us up with the realtime metadata locked. */  int -xchk_setup_rt( +xchk_setup_rtbitmap(  	struct xfs_scrub	*sc)  {  	int			error; -	error = xchk_setup_fs(sc); +	error = xchk_trans_alloc(sc, 0);  	if (error)  		return error; -	sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP; -	sc->ip = sc->mp->m_rbmip; -	xfs_ilock(sc->ip, sc->ilock_flags); +	error = xchk_install_live_inode(sc, sc->mp->m_rbmip); +	if (error) +		return error; +	xchk_ilock(sc, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP);  	return 0;  } @@ -123,43 +124,6 @@ out:  	return error;  } -/* Scrub the realtime summary. */ -int -xchk_rtsummary( -	struct xfs_scrub	*sc) -{ -	struct xfs_inode	*rsumip = sc->mp->m_rsumip; -	struct xfs_inode	*old_ip = sc->ip; -	uint			old_ilock_flags = sc->ilock_flags; -	int			error = 0; - -	/* -	 * We ILOCK'd the rt bitmap ip in the setup routine, now lock the -	 * rt summary ip in compliance with the rt inode locking rules. -	 * -	 * Since we switch sc->ip to rsumip we have to save the old ilock -	 * flags so that we don't mix up the inode state that @sc tracks. -	 */ -	sc->ip = rsumip; -	sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM; -	xfs_ilock(sc->ip, sc->ilock_flags); - -	/* Invoke the fork scrubber. */ -	error = xchk_metadata_inode_forks(sc); -	if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) -		goto out; - -	/* XXX: implement this some day */ -	xchk_set_incomplete(sc); -out: -	/* Switch back to the rtbitmap inode and lock flags. */ -	xfs_iunlock(sc->ip, sc->ilock_flags); -	sc->ilock_flags = old_ilock_flags; -	sc->ip = old_ip; -	return error; -} - -  /* xref check that the extent is not free in the rtbitmap */  void  xchk_xref_is_used_rt_space(  |