From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 06/20] xfs: halt auto-reclamation activities while rebuilding rmap
Date: Mon, 26 Mar 2018 16:56:32 -0700 [thread overview]
Message-ID: <152210859201.13184.1114348565922103.stgit@magnolia> (raw)
In-Reply-To: <152210855435.13184.6475770131389744177.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Rebuilding the reverse-mapping tree requires us to quiesce all inodes in
the filesystem, so we must stop background reclamation of post-EOF and
CoW prealloc blocks.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_icache.c | 18 ++++++++++++++++++
fs/xfs/xfs_icache.h | 3 +++
2 files changed, 21 insertions(+)
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index d53a316..52f5ab0 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -1781,3 +1781,21 @@ xfs_inode_clear_cowblocks_tag(
return __xfs_inode_clear_blocks_tag(ip,
trace_xfs_perag_clear_cowblocks, XFS_ICI_COWBLOCKS_TAG);
}
+
+/* Disable post-EOF and CoW block auto-reclamation. */
+void
+xfs_icache_disable_reclaim(
+ struct xfs_mount *mp)
+{
+ cancel_delayed_work_sync(&mp->m_eofblocks_work);
+ cancel_delayed_work_sync(&mp->m_cowblocks_work);
+}
+
+/* Enable post-EOF and CoW block auto-reclamation. */
+void
+xfs_icache_enable_reclaim(
+ struct xfs_mount *mp)
+{
+ xfs_queue_eofblocks(mp);
+ xfs_queue_cowblocks(mp);
+}
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h
index d4a7758..d69a0f5 100644
--- a/fs/xfs/xfs_icache.h
+++ b/fs/xfs/xfs_icache.h
@@ -131,4 +131,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);
+
#endif
next prev parent reply other threads:[~2018-03-26 23:56 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 23:55 [PATCH v14 00/20] xfs-4.17: online repair support Darrick J. Wong
2018-03-26 23:56 ` [PATCH 01/20] xfs: add helpers to calculate btree size Darrick J. Wong
2018-03-27 22:54 ` Dave Chinner
2018-03-26 23:56 ` [PATCH 02/20] xfs: expose various functions to repair code Darrick J. Wong
2018-03-27 22:55 ` Dave Chinner
2018-03-26 23:56 ` [PATCH 03/20] xfs: add repair helpers for the reverse mapping btree Darrick J. Wong
2018-03-27 23:03 ` Dave Chinner
2018-03-27 23:29 ` Darrick J. Wong
2018-03-26 23:56 ` [PATCH 04/20] xfs: add repair helpers for the reference count btree Darrick J. Wong
2018-03-27 23:04 ` Dave Chinner
2018-03-26 23:56 ` [PATCH 05/20] xfs: add BMAPI_NORMAP flag to perform block remapping without updating rmpabt Darrick J. Wong
2018-03-27 23:09 ` Dave Chinner
2018-03-26 23:56 ` Darrick J. Wong [this message]
2018-03-27 23:15 ` [PATCH 06/20] xfs: halt auto-reclamation activities while rebuilding rmap Dave Chinner
2018-03-27 23:50 ` Darrick J. Wong
2018-03-26 23:56 ` [PATCH 07/20] xfs: create tracepoints for online repair Darrick J. Wong
2018-03-27 23:18 ` Dave Chinner
2018-03-27 23:33 ` Darrick J. Wong
2018-03-26 23:56 ` [PATCH 08/20] xfs: implement the metadata repair ioctl flag Darrick J. Wong
2018-03-27 23:55 ` Dave Chinner
2018-03-28 4:58 ` Darrick J. Wong
2018-03-28 23:19 ` Darrick J. Wong
2018-03-28 23:42 ` Dave Chinner
2018-03-26 23:56 ` [PATCH 09/20] xfs: add helper routines for the repair code Darrick J. Wong
2018-03-26 23:56 ` [PATCH 10/20] xfs: repair superblocks Darrick J. Wong
2018-03-26 23:57 ` [PATCH 11/20] xfs: repair the AGF and AGFL Darrick J. Wong
2018-03-26 23:57 ` [PATCH 12/20] xfs: repair the AGI Darrick J. Wong
2018-03-26 23:57 ` [PATCH 13/20] xfs: repair free space btrees Darrick J. Wong
2018-03-26 23:57 ` [PATCH 14/20] xfs: repair inode btrees Darrick J. Wong
2018-03-26 23:57 ` [PATCH 15/20] xfs: repair the rmapbt Darrick J. Wong
2018-03-26 23:57 ` [PATCH 16/20] xfs: repair refcount btrees Darrick J. Wong
2018-03-26 23:57 ` [PATCH 17/20] xfs: repair inode records Darrick J. Wong
2018-03-26 23:57 ` [PATCH 18/20] xfs: zap broken inode forks Darrick J. Wong
2018-03-26 23:57 ` [PATCH 19/20] xfs: repair inode block maps Darrick J. Wong
2018-03-26 23:58 ` [PATCH 20/20] xfs: repair damaged symlinks Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2018-03-15 20:26 [PATCH v13 00/20] xfs-4.17: online repair support Darrick J. Wong
2018-03-15 20:26 ` [PATCH 06/20] xfs: halt auto-reclamation activities while rebuilding rmap Darrick J. Wong
2018-02-23 2:01 [PATCH v12 00/20] xfs: online repair support Darrick J. Wong
2018-02-23 2:02 ` [PATCH 06/20] xfs: halt auto-reclamation activities while rebuilding rmap Darrick J. Wong
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=152210859201.13184.1114348565922103.stgit@magnolia \
--to=darrick.wong@oracle.com \
--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).