From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org, hch@infradead.org,
david@fromorbit.com
Subject: [PATCH 3/9] xfs: hide xfs_icache_free_cowblocks
Date: Sat, 23 Jan 2021 10:53:38 -0800 [thread overview]
Message-ID: <161142801869.2173480.15740054426783383934.stgit@magnolia> (raw)
In-Reply-To: <161142800187.2173480.17415824680111946713.stgit@magnolia>
From: Darrick J. Wong <djwong@kernel.org>
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 | 2 +-
fs/xfs/xfs_icache.h | 1 -
fs/xfs/xfs_super.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 4137ad853b17..db32ad2f6ced 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -1567,7 +1567,7 @@ xfs_inode_free_cowblocks(
return ret;
}
-int
+static int
xfs_icache_free_cowblocks(
struct xfs_mount *mp,
struct xfs_eofblocks *eofb)
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h
index c23e49aab683..8566798d42ab 100644
--- a/fs/xfs/xfs_icache.h
+++ b/fs/xfs/xfs_icache.h
@@ -66,7 +66,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 *);
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index ebe3eba2cbbc..e440065ec503 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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;
next prev parent reply other threads:[~2021-01-23 18:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-23 18:53 [PATCHSET v4 0/9] xfs: consolidate posteof and cowblocks cleanup Darrick J. Wong
2021-01-23 18:53 ` [PATCH 1/9] xfs: relocate the eofb/cowb workqueue functions Darrick J. Wong
2021-01-23 18:53 ` [PATCH 2/9] xfs: hide xfs_icache_free_eofblocks Darrick J. Wong
2021-01-23 18:53 ` Darrick J. Wong [this message]
2021-01-23 18:53 ` [PATCH 4/9] xfs: remove trivial eof/cowblocks functions Darrick J. Wong
2021-01-23 18:53 ` [PATCH 5/9] xfs: consolidate incore inode radix tree posteof/cowblocks tags Darrick J. Wong
2021-01-23 18:53 ` [PATCH 6/9] xfs: consolidate the eofblocks and cowblocks workers Darrick J. Wong
2021-01-23 18:54 ` [PATCH 7/9] xfs: only walk the incore inode tree once per blockgc scan Darrick J. Wong
2021-01-23 18:54 ` [PATCH 8/9] xfs: rename block gc start and stop functions Darrick J. Wong
2021-01-23 18:54 ` [PATCH 9/9] xfs: parallelize block preallocation garbage collection Darrick J. Wong
2021-01-26 5:12 ` [PATCH v4.1 " Darrick J. Wong
2021-01-26 5:13 ` [PATCH 10/9] xfs: expose the blockgc workqueue knobs publicly Darrick J. Wong
2021-01-27 17:03 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=161142801869.2173480.15740054426783383934.stgit@magnolia \
--to=djwong@kernel.org \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).