From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 04/10] xfs: pass per-ag structure to the xfs_ici_walk execute function
Date: Tue, 31 Dec 2019 17:09:05 -0800 [thread overview]
Message-ID: <157784094496.1362752.10290761414347952592.stgit@magnolia> (raw)
In-Reply-To: <157784092020.1362752.15046503361741521784.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
Pass the per-AG structure to the xfs_ici_walk execute function. This
isn't needed now, but deferred inactivation will need it to modify some
per-ag data.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_icache.c | 24 ++++++++++++++++--------
fs/xfs/xfs_icache.h | 2 +-
fs/xfs/xfs_qm_syscalls.c | 1 +
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 1a09d4854266..d9bfc78a1b85 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -26,8 +26,10 @@
#include <linux/iversion.h>
-STATIC int xfs_inode_free_eofblocks(struct xfs_inode *ip, void *args);
-STATIC int xfs_inode_free_cowblocks(struct xfs_inode *ip, void *args);
+STATIC int xfs_inode_free_eofblocks(struct xfs_inode *ip, struct xfs_perag *pag,
+ void *args);
+STATIC int xfs_inode_free_cowblocks(struct xfs_inode *ip, struct xfs_perag *pag,
+ void *args);
/*
* Allocate and initialise an xfs_inode.
@@ -798,7 +800,8 @@ STATIC int
xfs_ici_walk_ag(
struct xfs_mount *mp,
struct xfs_perag *pag,
- int (*execute)(struct xfs_inode *ip, void *args),
+ int (*execute)(struct xfs_inode *ip,
+ struct xfs_perag *pag, void *args),
void *args,
int tag,
int iter_flags)
@@ -874,7 +877,7 @@ xfs_ici_walk_ag(
if ((iter_flags & XFS_ICI_WALK_INEW_WAIT) &&
xfs_iflags_test(batch[i], XFS_INEW))
xfs_inew_wait(batch[i]);
- error = execute(batch[i], args);
+ error = execute(batch[i], pag, args);
xfs_irele(batch[i]);
if (error == -EAGAIN) {
skipped++;
@@ -919,7 +922,8 @@ STATIC int
xfs_ici_walk(
struct xfs_mount *mp,
int iter_flags,
- int (*execute)(struct xfs_inode *ip, void *args),
+ int (*execute)(struct xfs_inode *ip,
+ struct xfs_perag *pag, void *args),
void *args,
int tag)
{
@@ -950,7 +954,8 @@ xfs_ici_walk(
int
xfs_ici_walk_all(
struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip, void *args),
+ int (*execute)(struct xfs_inode *ip,
+ struct xfs_perag *pag, void *args),
void *args)
{
return xfs_ici_walk(mp, XFS_ICI_WALK_INEW_WAIT, execute, args,
@@ -977,15 +982,16 @@ xfs_queue_blockgc(
static int
xfs_blockgc_scan_inode(
struct xfs_inode *ip,
+ struct xfs_perag *pag,
void *args)
{
int error;
- error = xfs_inode_free_eofblocks(ip, args);
+ error = xfs_inode_free_eofblocks(ip, pag, args);
if (error && error != -EAGAIN)
return error;
- return xfs_inode_free_cowblocks(ip, args);
+ return xfs_inode_free_cowblocks(ip, pag, args);
}
/* Scan an AG's inodes for block preallocations that we can remove. */
@@ -1528,6 +1534,7 @@ xfs_inode_matches_eofb(
STATIC int
xfs_inode_free_eofblocks(
struct xfs_inode *ip,
+ struct xfs_perag *pag,
void *args)
{
struct xfs_eofblocks *eofb = args;
@@ -1806,6 +1813,7 @@ xfs_prep_free_cowblocks(
STATIC int
xfs_inode_free_cowblocks(
struct xfs_inode *ip,
+ struct xfs_perag *pag,
void *args)
{
struct xfs_eofblocks *eofb = args;
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h
index ee4e05b59afb..d7713eb0734d 100644
--- a/fs/xfs/xfs_icache.h
+++ b/fs/xfs/xfs_icache.h
@@ -70,7 +70,7 @@ void xfs_inode_clear_cowblocks_tag(struct xfs_inode *ip);
int xfs_icache_free_cowblocks(struct xfs_mount *, struct xfs_eofblocks *);
int xfs_ici_walk_all(struct xfs_mount *mp,
- int (*execute)(struct xfs_inode *ip, void *args),
+ int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag, void *args),
void *args);
int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp,
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index d93bf0c39d3d..fa0db72f8d0d 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -733,6 +733,7 @@ struct xfs_dqrele {
STATIC int
xfs_dqrele_inode(
struct xfs_inode *ip,
+ struct xfs_perag *pag,
void *args)
{
struct xfs_dqrele *dqr = args;
next prev parent reply other threads:[~2020-01-01 1:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 1:08 [PATCH v2 00/10] xfs: deferred inode inactivation Darrick J. Wong
2020-01-01 1:08 ` [PATCH 01/10] xfs: decide if inode needs inactivation Darrick J. Wong
2020-01-01 1:08 ` [PATCH 02/10] xfs: track unlinked inactive inode fs summary counters Darrick J. Wong
2020-01-01 1:08 ` [PATCH 03/10] xfs: track unlinked inactive inode quota counters Darrick J. Wong
2020-01-01 1:09 ` Darrick J. Wong [this message]
2020-01-01 1:09 ` [PATCH 05/10] xfs: pass around xfs_inode_ag_walk iget/irele helper functions Darrick J. Wong
2020-01-01 1:09 ` [PATCH 06/10] xfs: deferred inode inactivation Darrick J. Wong
2020-01-01 1:09 ` [PATCH 07/10] xfs: force inode inactivation and retry fs writes when there isn't space Darrick J. Wong
2020-01-01 1:09 ` [PATCH 08/10] xfs: force inactivation before fallocate when space is low Darrick J. Wong
2020-01-01 1:09 ` [PATCH 09/10] xfs: parallelize inode inactivation Darrick J. Wong
2020-01-01 1:09 ` [PATCH 10/10] xfs: create a polled function to force " 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=157784094496.1362752.10290761414347952592.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.