Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -9
+2 -2
fs/xfs/xfs_icache.c
··· 1822 1822 1823 1823 /* Disable post-EOF and CoW block auto-reclamation. */ 1824 1824 void 1825 - xfs_icache_disable_reclaim( 1825 + xfs_stop_block_reaping( 1826 1826 struct xfs_mount *mp) 1827 1827 { 1828 1828 cancel_delayed_work_sync(&mp->m_eofblocks_work); ··· 1831 1831 1832 1832 /* Enable post-EOF and CoW block auto-reclamation. */ 1833 1833 void 1834 - xfs_icache_enable_reclaim( 1834 + xfs_start_block_reaping( 1835 1835 struct xfs_mount *mp) 1836 1836 { 1837 1837 xfs_queue_eofblocks(mp);
+2 -2
fs/xfs/xfs_icache.h
··· 119 119 int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp, 120 120 xfs_ino_t ino, bool *inuse); 121 121 122 - void xfs_icache_disable_reclaim(struct xfs_mount *mp); 123 - void xfs_icache_enable_reclaim(struct xfs_mount *mp); 122 + void xfs_stop_block_reaping(struct xfs_mount *mp); 123 + void xfs_start_block_reaping(struct xfs_mount *mp); 124 124 125 125 #endif
+1 -1
fs/xfs/xfs_mount.c
··· 1107 1107 uint64_t resblks; 1108 1108 int error; 1109 1109 1110 - xfs_icache_disable_reclaim(mp); 1110 + xfs_stop_block_reaping(mp); 1111 1111 xfs_fs_unreserve_ag_blocks(mp); 1112 1112 xfs_qm_unmount_quotas(mp); 1113 1113 xfs_rtunmount_inodes(mp);
+4 -4
fs/xfs/xfs_super.c
··· 1368 1368 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); 1369 1369 return error; 1370 1370 } 1371 - xfs_icache_enable_reclaim(mp); 1371 + xfs_start_block_reaping(mp); 1372 1372 1373 1373 /* Create the per-AG metadata reservation pool .*/ 1374 1374 error = xfs_fs_reserve_ag_blocks(mp); ··· 1382 1382 * Cancel background eofb scanning so it cannot race with the 1383 1383 * final log force+buftarg wait and deadlock the remount. 1384 1384 */ 1385 - xfs_icache_disable_reclaim(mp); 1385 + xfs_stop_block_reaping(mp); 1386 1386 1387 1387 /* Get rid of any leftover CoW reservations... */ 1388 1388 error = xfs_icache_free_cowblocks(mp, NULL); ··· 1426 1426 { 1427 1427 struct xfs_mount *mp = XFS_M(sb); 1428 1428 1429 - xfs_icache_disable_reclaim(mp); 1429 + xfs_stop_block_reaping(mp); 1430 1430 xfs_save_resvblks(mp); 1431 1431 xfs_quiesce_attr(mp); 1432 1432 return xfs_sync_sb(mp, true); ··· 1440 1440 1441 1441 xfs_restore_resvblks(mp); 1442 1442 xfs_log_work_queue(mp); 1443 - xfs_icache_enable_reclaim(mp); 1443 + xfs_start_block_reaping(mp); 1444 1444 return 0; 1445 1445 } 1446 1446