From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [RFC PATCH 3/3] replace xfs_iflush_all with xfs_reclaim_all
Date: Tue, 24 Apr 2007 12:12:52 +0200 [thread overview]
Message-ID: <20070424101252.GA28314@lst.de> (raw)
xfs_iflush_all is another variant of the loop all deleted inodes
without vnode and flush them scheme. Use xfs_finish_reclaim_all
without the nonblock flag and with XFS_IFLUSH_ASYNC as sync_flag
instead.
Btw, shouldn't xfs_quiesce_fs also pass XFS_IFLUSH_ASYNC to
xfs_finish_reclaim_all?
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/xfs/xfs_inode.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_inode.c 2007-04-24 10:58:55.000000000 +0200
+++ linux-2.6/fs/xfs/xfs_inode.c 2007-04-24 11:00:42.000000000 +0200
@@ -3518,45 +3518,6 @@ corrupt_out:
return XFS_ERROR(EFSCORRUPTED);
}
-
-/*
- * Flush all inactive inodes in mp.
- */
-void
-xfs_iflush_all(
- xfs_mount_t *mp)
-{
- xfs_inode_t *ip;
- bhv_vnode_t *vp;
-
- again:
- XFS_MOUNT_ILOCK(mp);
- ip = mp->m_inodes;
- if (ip == NULL)
- goto out;
-
- do {
- /* Make sure we skip markers inserted by sync */
- if (ip->i_mount == NULL) {
- ip = ip->i_mnext;
- continue;
- }
-
- vp = XFS_ITOV_NULL(ip);
- if (!vp) {
- XFS_MOUNT_IUNLOCK(mp);
- xfs_finish_reclaim(ip, 0, XFS_IFLUSH_ASYNC);
- goto again;
- }
-
- ASSERT(vn_count(vp) == 0);
-
- ip = ip->i_mnext;
- } while (ip != mp->m_inodes);
- out:
- XFS_MOUNT_IUNLOCK(mp);
-}
-
/*
* xfs_iaccess: check accessibility of inode for mode.
*/
Index: linux-2.6/fs/xfs/xfs_inode.h
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_inode.h 2007-04-24 10:58:55.000000000 +0200
+++ linux-2.6/fs/xfs/xfs_inode.h 2007-04-24 11:00:22.000000000 +0200
@@ -499,7 +499,6 @@ void xfs_ipin(xfs_inode_t *);
void xfs_iunpin(xfs_inode_t *);
int xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_t *, int);
int xfs_iflush(xfs_inode_t *, uint);
-void xfs_iflush_all(struct xfs_mount *);
int xfs_iaccess(xfs_inode_t *, mode_t, cred_t *);
uint xfs_iroundup(uint);
void xfs_ichgtime(xfs_inode_t *, int);
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_mount.c 2007-04-24 10:58:53.000000000 +0200
+++ linux-2.6/fs/xfs/xfs_mount.c 2007-04-24 11:00:22.000000000 +0200
@@ -1084,7 +1084,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cr
int64_t fsid;
#endif
- xfs_iflush_all(mp);
+ xfs_finish_reclaim_all(mp, 0, XFS_IFLUSH_ASYNC);
XFS_QM_DQPURGEALL(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_UMOUNTING);
reply other threads:[~2007-04-24 10:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070424101252.GA28314@lst.de \
--to=hch@lst.de \
--cc=xfs@oss.sgi.com \
/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.