xfs: rename the speculative block allocation reclaim toggle functions
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 01:26:22 +0000 (18:26 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 19:28:55 +0000 (12:28 -0700)
"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>
fs/xfs/xfs_icache.c
fs/xfs/xfs_icache.h
fs/xfs/xfs_mount.c
fs/xfs/xfs_super.c

index 69ad1f3..a76b275 100644 (file)
@@ -1822,7 +1822,7 @@ xfs_inode_clear_cowblocks_tag(
 
 /* Disable post-EOF and CoW block auto-reclamation. */
 void
-xfs_icache_disable_reclaim(
+xfs_stop_block_reaping(
        struct xfs_mount        *mp)
 {
        cancel_delayed_work_sync(&mp->m_eofblocks_work);
@@ -1831,7 +1831,7 @@ xfs_icache_disable_reclaim(
 
 /* Enable post-EOF and CoW block auto-reclamation. */
 void
-xfs_icache_enable_reclaim(
+xfs_start_block_reaping(
        struct xfs_mount        *mp)
 {
        xfs_queue_eofblocks(mp);
index 26c0626..48f1fd2 100644 (file)
@@ -119,7 +119,7 @@ xfs_fs_eofblocks_from_user(
 int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp,
                                  xfs_ino_t ino, bool *inuse);
 
-void xfs_icache_disable_reclaim(struct xfs_mount *mp);
-void xfs_icache_enable_reclaim(struct xfs_mount *mp);
+void xfs_stop_block_reaping(struct xfs_mount *mp);
+void xfs_start_block_reaping(struct xfs_mount *mp);
 
 #endif
index 4cedf6f..6b2bfe8 100644 (file)
@@ -1107,7 +1107,7 @@ xfs_unmountfs(
        uint64_t                resblks;
        int                     error;
 
-       xfs_icache_disable_reclaim(mp);
+       xfs_stop_block_reaping(mp);
        xfs_fs_unreserve_ag_blocks(mp);
        xfs_qm_unmount_quotas(mp);
        xfs_rtunmount_inodes(mp);
index 3a870a1..86c18f2 100644 (file)
@@ -1368,7 +1368,7 @@ xfs_fs_remount(
                        xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
                        return error;
                }
-               xfs_icache_enable_reclaim(mp);
+               xfs_start_block_reaping(mp);
 
                /* Create the per-AG metadata reservation pool .*/
                error = xfs_fs_reserve_ag_blocks(mp);
@@ -1382,7 +1382,7 @@ xfs_fs_remount(
                 * Cancel background eofb scanning so it cannot race with the
                 * 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... */
                error = xfs_icache_free_cowblocks(mp, NULL);
@@ -1426,7 +1426,7 @@ xfs_fs_freeze(
 {
        struct xfs_mount        *mp = XFS_M(sb);
 
-       xfs_icache_disable_reclaim(mp);
+       xfs_stop_block_reaping(mp);
        xfs_save_resvblks(mp);
        xfs_quiesce_attr(mp);
        return xfs_sync_sb(mp, true);
@@ -1440,7 +1440,7 @@ xfs_fs_unfreeze(
 
        xfs_restore_resvblks(mp);
        xfs_log_work_queue(mp);
-       xfs_icache_enable_reclaim(mp);
+       xfs_start_block_reaping(mp);
        return 0;
 }