xfs: rename the speculative block allocation reclaim toggle functions

"reclaim" is used throughout the icache code to mean reclamation of
incore inode structures.  It's also used for two helper functions that
toggle background deletion of speculative preallocations.  Separate
the second of the two uses to make things less confusing.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
Darrick J. Wong 2019-04-25 18:26:22 -07:00
parent 9fe82b8c42
commit ed30dcbd90
4 changed files with 9 additions and 9 deletions

View File

@ -1822,7 +1822,7 @@ xfs_inode_clear_cowblocks_tag(
/* Disable post-EOF and CoW block auto-reclamation. */ /* Disable post-EOF and CoW block auto-reclamation. */
void void
xfs_icache_disable_reclaim( xfs_stop_block_reaping(
struct xfs_mount *mp) struct xfs_mount *mp)
{ {
cancel_delayed_work_sync(&mp->m_eofblocks_work); cancel_delayed_work_sync(&mp->m_eofblocks_work);
@ -1831,7 +1831,7 @@ xfs_icache_disable_reclaim(
/* Enable post-EOF and CoW block auto-reclamation. */ /* Enable post-EOF and CoW block auto-reclamation. */
void void
xfs_icache_enable_reclaim( xfs_start_block_reaping(
struct xfs_mount *mp) struct xfs_mount *mp)
{ {
xfs_queue_eofblocks(mp); xfs_queue_eofblocks(mp);

View File

@ -119,7 +119,7 @@ xfs_fs_eofblocks_from_user(
int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp, int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp,
xfs_ino_t ino, bool *inuse); xfs_ino_t ino, bool *inuse);
void xfs_icache_disable_reclaim(struct xfs_mount *mp); void xfs_stop_block_reaping(struct xfs_mount *mp);
void xfs_icache_enable_reclaim(struct xfs_mount *mp); void xfs_start_block_reaping(struct xfs_mount *mp);
#endif #endif

View File

@ -1107,7 +1107,7 @@ xfs_unmountfs(
uint64_t resblks; uint64_t resblks;
int error; int error;
xfs_icache_disable_reclaim(mp); xfs_stop_block_reaping(mp);
xfs_fs_unreserve_ag_blocks(mp); xfs_fs_unreserve_ag_blocks(mp);
xfs_qm_unmount_quotas(mp); xfs_qm_unmount_quotas(mp);
xfs_rtunmount_inodes(mp); xfs_rtunmount_inodes(mp);

View File

@ -1368,7 +1368,7 @@ xfs_fs_remount(
xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
return error; return error;
} }
xfs_icache_enable_reclaim(mp); xfs_start_block_reaping(mp);
/* Create the per-AG metadata reservation pool .*/ /* Create the per-AG metadata reservation pool .*/
error = xfs_fs_reserve_ag_blocks(mp); error = xfs_fs_reserve_ag_blocks(mp);
@ -1382,7 +1382,7 @@ xfs_fs_remount(
* Cancel background eofb scanning so it cannot race with the * Cancel background eofb scanning so it cannot race with the
* final log force+buftarg wait and deadlock the remount. * final log force+buftarg wait and deadlock the remount.
*/ */
xfs_icache_disable_reclaim(mp); xfs_stop_block_reaping(mp);
/* Get rid of any leftover CoW reservations... */ /* Get rid of any leftover CoW reservations... */
error = xfs_icache_free_cowblocks(mp, NULL); error = xfs_icache_free_cowblocks(mp, NULL);
@ -1426,7 +1426,7 @@ xfs_fs_freeze(
{ {
struct xfs_mount *mp = XFS_M(sb); struct xfs_mount *mp = XFS_M(sb);
xfs_icache_disable_reclaim(mp); xfs_stop_block_reaping(mp);
xfs_save_resvblks(mp); xfs_save_resvblks(mp);
xfs_quiesce_attr(mp); xfs_quiesce_attr(mp);
return xfs_sync_sb(mp, true); return xfs_sync_sb(mp, true);
@ -1440,7 +1440,7 @@ xfs_fs_unfreeze(
xfs_restore_resvblks(mp); xfs_restore_resvblks(mp);
xfs_log_work_queue(mp); xfs_log_work_queue(mp);
xfs_icache_enable_reclaim(mp); xfs_start_block_reaping(mp);
return 0; return 0;
} }