Message ID | 161543198495.1947934.14544893595452477454.stgit@magnolia (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs: deferred inode inactivation | expand |
On Wed, Mar 10, 2021 at 07:06:25PM -0800, Darrick J. Wong wrote: > + error = xfs_inode_walk(mp, 0, xfs_blockgc_scan_inode, eofb, > XFS_ICI_BLOCKGC_TAG); Nit: strange double whitespace here.
On Mon, Mar 15, 2021 at 06:54:53PM +0000, Christoph Hellwig wrote: > On Wed, Mar 10, 2021 at 07:06:25PM -0800, Darrick J. Wong wrote: > > + error = xfs_inode_walk(mp, 0, xfs_blockgc_scan_inode, eofb, > > XFS_ICI_BLOCKGC_TAG); > > Nit: strange double whitespace here. Yeah, that'll go away in the next version. As part of a new small series to eliminate the indirect calls in xfs_inode_walk when possible, I figured out that we could get rid of the flags and tag arguments. --D
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 6081bba3c6ce..594d340bbe37 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -1868,10 +1868,16 @@ xfs_blockgc_free_space( struct xfs_mount *mp, struct xfs_eofblocks *eofb) { + int error; + trace_xfs_blockgc_free_space(mp, eofb, _RET_IP_); - return xfs_inode_walk(mp, 0, xfs_blockgc_scan_inode, eofb, + error = xfs_inode_walk(mp, 0, xfs_blockgc_scan_inode, eofb, XFS_ICI_BLOCKGC_TAG); + if (error) + return error; + + return xfs_inodegc_free_space(mp, eofb); } /* @@ -2054,7 +2060,7 @@ xfs_inactive_inode( * corrupted, we still need to clear the INACTIVE iflag so that we can move * on to reclaiming the inode. */ -static int +int xfs_inodegc_free_space( struct xfs_mount *mp, struct xfs_eofblocks *eofb) diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h index c199b920722a..9d5a1f4c0369 100644 --- a/fs/xfs/xfs_icache.h +++ b/fs/xfs/xfs_icache.h @@ -86,5 +86,6 @@ void xfs_inodegc_worker(struct work_struct *work); void xfs_inodegc_force(struct xfs_mount *mp); void xfs_inodegc_stop(struct xfs_mount *mp); void xfs_inodegc_start(struct xfs_mount *mp); +int xfs_inodegc_free_space(struct xfs_mount *mp, struct xfs_eofblocks *eofb); #endif