From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 5/6] [XFS] Remove unused parameter from xfs_reclaim_inodes
Date: Sun, 15 Mar 2009 22:46:42 +1100 [thread overview]
Message-ID: <1237117603-26071-6-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1237117603-26071-1-git-send-email-david@fromorbit.com>
The noblock parameter of xfs_reclaim_inodes() is only
ever set to zero. Remove it and all the conditional
code that is never executed.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
fs/xfs/linux-2.6/xfs_sync.c | 23 ++++-------------------
fs/xfs/linux-2.6/xfs_sync.h | 2 +-
fs/xfs/xfs_mount.c | 2 +-
3 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 1fa29de..f9c2a56 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -398,7 +398,7 @@ xfs_quiesce_fs(
int count = 0, pincount;
xfs_flush_buftarg(mp->m_ddev_targp, 0);
- xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
+ xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/*
* This loop must run at least twice. The first instance of the loop
@@ -522,7 +522,7 @@ xfs_sync_worker(
if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
- xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
+ xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/* dgc: errors ignored here */
error = XFS_QM_DQSYNC(mp, SYNC_BDFLUSH);
error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
@@ -728,7 +728,6 @@ STATIC void
xfs_reclaim_inodes_ag(
xfs_mount_t *mp,
int ag,
- int noblock,
int mode)
{
xfs_inode_t *ip = NULL;
@@ -775,26 +774,13 @@ restart:
read_unlock(&pag->pag_ici_lock);
continue;
}
-
- if (noblock) {
- if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) {
- read_unlock(&pag->pag_ici_lock);
- continue;
- }
- if (xfs_ipincount(ip) ||
- !xfs_iflock_nowait(ip)) {
- xfs_iunlock(ip, XFS_ILOCK_EXCL);
- read_unlock(&pag->pag_ici_lock);
- continue;
- }
- }
read_unlock(&pag->pag_ici_lock);
/*
* hmmm - this is an inode already in reclaim. Do
* we even bother catching it here?
*/
- if (xfs_reclaim_inode(ip, noblock, mode))
+ if (xfs_reclaim_inode(ip, 0, mode))
skipped++;
} while (nr_found);
@@ -809,7 +795,6 @@ restart:
int
xfs_reclaim_inodes(
xfs_mount_t *mp,
- int noblock,
int mode)
{
int i;
@@ -817,7 +802,7 @@ xfs_reclaim_inodes(
for (i = 0; i < mp->m_sb.sb_agcount; i++) {
if (!mp->m_perag[i].pag_ici_init)
continue;
- xfs_reclaim_inodes_ag(mp, i, noblock, mode);
+ xfs_reclaim_inodes_ag(mp, i, mode);
}
return 0;
}
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h
index 308d5bf..d7b2b5f 100644
--- a/fs/xfs/linux-2.6/xfs_sync.h
+++ b/fs/xfs/linux-2.6/xfs_sync.h
@@ -48,7 +48,7 @@ void xfs_quiesce_attr(struct xfs_mount *mp);
void xfs_flush_inodes(struct xfs_inode *ip);
int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode);
-int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode);
+int xfs_reclaim_inodes(struct xfs_mount *mp, int mode);
void xfs_inode_set_reclaim_tag(struct xfs_inode *ip);
void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 664961e..30918da 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1235,7 +1235,7 @@ xfs_unmountfs(
* need to force the log first.
*/
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC);
- xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_ASYNC);
+ xfs_reclaim_inodes(mp, XFS_IFLUSH_ASYNC);
XFS_QM_DQPURGEALL(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_UMOUNTING);
--
1.6.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-03-15 11:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-15 11:46 [PATCH 0/6] [XFS] introduce a AG inode tree walker Dave Chinner
2009-03-15 11:46 ` [PATCH 1/6] [XFS] Split inode data writeback from inode sync Dave Chinner
2009-03-16 10:10 ` Christoph Hellwig
2009-03-16 10:47 ` Dave Chinner
2009-03-15 11:46 ` [PATCH 2/6] [XFS] Use xfs_inode_flush() in xfs_sync_inodes_ag() Dave Chinner
2009-03-15 11:46 ` [PATCH 3/6] [XFS] Factor out inode validation for sync Dave Chinner
2009-03-15 11:46 ` [PATCH 4/6] [XFS] Factor out inode validation for reclaim Dave Chinner
2009-03-15 11:46 ` Dave Chinner [this message]
2009-03-15 11:46 ` [PATCH 6/6] [XFS] introduce a per-ag inode iterator Dave Chinner
2009-03-16 7:53 ` [PATCH 0/6] [XFS] introduce a AG inode tree walker Christoph Hellwig
2009-03-16 9:40 ` Dave Chinner
2009-03-16 10:01 ` Christoph Hellwig
2009-03-16 10:35 ` Dave Chinner
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=1237117603-26071-6-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox