xfs: hide xfs_icache_free_cowblocks
authorDarrick J. Wong <djwong@kernel.org>
Sat, 23 Jan 2021 00:48:40 +0000 (16:48 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 3 Feb 2021 17:18:49 +0000 (09:18 -0800)
Change the one remaining caller of xfs_icache_free_cowblocks to use our
new combined blockgc scan function instead, since we will soon be
combining the two scans.  This introduces a slight behavior change,
since a readonly remount now clears out post-EOF preallocations and not
just CoW staging extents.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_icache.c
fs/xfs/xfs_icache.h
fs/xfs/xfs_super.c

index d1a8490..45146e0 100644 (file)
@@ -1567,7 +1567,7 @@ out_iolock:
        return ret;
 }
 
-int
+static int
 xfs_icache_free_cowblocks(
        struct xfs_mount        *mp,
        struct xfs_eofblocks    *eofb)
index b8c2f23..de76045 100644 (file)
@@ -67,7 +67,6 @@ void xfs_queue_eofblocks(struct xfs_mount *);
 
 void xfs_inode_set_cowblocks_tag(struct xfs_inode *ip);
 void xfs_inode_clear_cowblocks_tag(struct xfs_inode *ip);
-int xfs_icache_free_cowblocks(struct xfs_mount *, struct xfs_eofblocks *);
 void xfs_cowblocks_worker(struct work_struct *);
 void xfs_queue_cowblocks(struct xfs_mount *);
 
index 8959561..e8f7171 100644 (file)
@@ -1713,7 +1713,7 @@ xfs_remount_ro(
        xfs_stop_block_reaping(mp);
 
        /* Get rid of any leftover CoW reservations... */
-       error = xfs_icache_free_cowblocks(mp, NULL);
+       error = xfs_blockgc_free_space(mp, NULL);
        if (error) {
                xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
                return error;