From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 02/13] xfs: rename the xfs_syncd workqueue
Date: Thu, 30 Aug 2012 20:57:31 +1000 [thread overview]
Message-ID: <1346324262-32724-3-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1346324262-32724-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
There is nothing "sync" realted to this work queue any more. It is a general
purpose per-filesystem work queue. Rename it appropriately, and remove the
"syncd" naming from various functions.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_mount.c | 1 +
fs/xfs/xfs_mount.h | 2 ++
fs/xfs/xfs_super.c | 14 +++++++-------
fs/xfs/xfs_sync.c | 19 +++++++++----------
fs/xfs/xfs_sync.h | 4 +---
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 29c2f83..e2979ee 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -43,6 +43,7 @@
#include "xfs_utils.h"
#include "xfs_trace.h"
+struct workqueue_struct *xfs_mount_wq;
#ifdef HAVE_PERCPU_SB
STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t,
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index deee09e..a0113dd 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -60,6 +60,8 @@ struct xfs_nameops;
struct xfs_ail;
struct xfs_quotainfo;
+extern struct workqueue_struct *xfs_mount_wq;
+
#ifdef HAVE_PERCPU_SB
/*
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 116fcb8..d75fdf3 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1298,7 +1298,7 @@ xfs_fs_fill_super(
INIT_DELAYED_WORK(&mp->m_sync_work, xfs_sync_worker);
INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker);
- xfs_syncd_queue_sync(mp);
+ xfs_sync_work_queue(mp);
error = xfs_mountfs(mp);
if (error)
@@ -1542,8 +1542,8 @@ xfs_init_workqueues(void)
* competing for ressources. Use the default large max_active value
* so that even lots of filesystems can perform these task in parallel.
*/
- xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_NON_REENTRANT, 0);
- if (!xfs_syncd_wq)
+ xfs_mount_wq = alloc_workqueue("xfsmount", WQ_NON_REENTRANT, 0);
+ if (!xfs_mount_wq)
return -ENOMEM;
/*
@@ -1554,12 +1554,12 @@ xfs_init_workqueues(void)
*/
xfs_alloc_wq = alloc_workqueue("xfsalloc", WQ_MEM_RECLAIM, 0);
if (!xfs_alloc_wq)
- goto out_destroy_syncd;
+ goto out_destroy_mount;
return 0;
-out_destroy_syncd:
- destroy_workqueue(xfs_syncd_wq);
+out_destroy_mount:
+ destroy_workqueue(xfs_mount_wq);
return -ENOMEM;
}
@@ -1567,7 +1567,7 @@ STATIC void
xfs_destroy_workqueues(void)
{
destroy_workqueue(xfs_alloc_wq);
- destroy_workqueue(xfs_syncd_wq);
+ destroy_workqueue(xfs_mount_wq);
}
STATIC int __init
diff --git a/fs/xfs/xfs_sync.c b/fs/xfs/xfs_sync.c
index 13830e4..7744ffe 100644
--- a/fs/xfs/xfs_sync.c
+++ b/fs/xfs/xfs_sync.c
@@ -39,7 +39,6 @@
#include <linux/kthread.h>
#include <linux/freezer.h>
-struct workqueue_struct *xfs_syncd_wq; /* sync workqueue */
/*
* The inode lookup is done in batches to keep the amount of lock traffic and
@@ -371,10 +370,10 @@ xfs_quiesce_attr(
}
void
-xfs_syncd_queue_sync(
+xfs_sync_work_queue(
struct xfs_mount *mp)
{
- queue_delayed_work(xfs_syncd_wq, &mp->m_sync_work,
+ queue_delayed_work(xfs_mount_wq, &mp->m_sync_work,
msecs_to_jiffies(xfs_syncd_centisecs * 10));
}
@@ -415,7 +414,7 @@ xfs_sync_worker(
}
/* queue us up again */
- xfs_syncd_queue_sync(mp);
+ xfs_sync_work_queue(mp);
}
/*
@@ -426,13 +425,13 @@ xfs_sync_worker(
* aggressive.
*/
static void
-xfs_syncd_queue_reclaim(
+xfs_reclaim_queue_work(
struct xfs_mount *mp)
{
rcu_read_lock();
if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_RECLAIM_TAG)) {
- queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work,
+ queue_delayed_work(xfs_mount_wq, &mp->m_reclaim_work,
msecs_to_jiffies(xfs_syncd_centisecs / 6 * 10));
}
rcu_read_unlock();
@@ -453,7 +452,7 @@ xfs_reclaim_worker(
struct xfs_mount, m_reclaim_work);
xfs_reclaim_inodes(mp, SYNC_TRYLOCK);
- xfs_syncd_queue_reclaim(mp);
+ xfs_reclaim_queue_work(mp);
}
/*
@@ -474,7 +473,7 @@ xfs_flush_inodes(
{
struct xfs_mount *mp = ip->i_mount;
- queue_work(xfs_syncd_wq, &mp->m_flush_work);
+ queue_work(xfs_mount_wq, &mp->m_flush_work);
flush_work_sync(&mp->m_flush_work);
}
@@ -507,7 +506,7 @@ __xfs_inode_set_reclaim_tag(
spin_unlock(&ip->i_mount->m_perag_lock);
/* schedule periodic background inode reclaim */
- xfs_syncd_queue_reclaim(ip->i_mount);
+ xfs_reclaim_queue_work(ip->i_mount);
trace_xfs_perag_set_reclaim(ip->i_mount, pag->pag_agno,
-1, _RET_IP_);
@@ -923,7 +922,7 @@ xfs_reclaim_inodes_nr(
int nr_to_scan)
{
/* kick background reclaimer and push the AIL */
- xfs_syncd_queue_reclaim(mp);
+ xfs_reclaim_queue_work(mp);
xfs_ail_push_all(mp->m_ail);
xfs_reclaim_inodes_ag(mp, SYNC_TRYLOCK | SYNC_WAIT, &nr_to_scan);
diff --git a/fs/xfs/xfs_sync.h b/fs/xfs/xfs_sync.h
index 3f59e5b..3c22f3d 100644
--- a/fs/xfs/xfs_sync.h
+++ b/fs/xfs/xfs_sync.h
@@ -24,9 +24,7 @@ struct xfs_perag;
#define SYNC_WAIT 0x0001 /* wait for i/o to complete */
#define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */
-extern struct workqueue_struct *xfs_syncd_wq; /* sync workqueue */
-
-void xfs_syncd_queue_sync(struct xfs_mount *mp);
+void xfs_sync_work_queue(struct xfs_mount *mp);
void xfs_sync_worker(struct work_struct *work);
void xfs_flush_worker(struct work_struct *work);
void xfs_reclaim_worker(struct work_struct *work);
--
1.7.10
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-08-30 10:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 10:57 [PATCH 00/13] xfs: remove the xfssyncd mess Dave Chinner
2012-08-30 10:57 ` [PATCH 01/13] xfs: xfs_syncd_stop must die Dave Chinner
2012-08-30 10:57 ` Dave Chinner [this message]
2012-08-30 10:57 ` [PATCH 03/13] xfs: rationalise xfs_mount_wq users Dave Chinner
2012-08-30 10:57 ` [PATCH 04/13] xfs: don't run the sync work if the filesyste is read-only Dave Chinner
2012-08-30 10:57 ` [PATCH 05/13] xfs: sync work is now only periodic log work Dave Chinner
2012-08-30 10:57 ` [PATCH 06/13] xfs: Bring some sanity to log unmounting Dave Chinner
2012-08-30 10:57 ` [PATCH 07/13] xfs: xfs_sync_data is redundant Dave Chinner
2012-08-30 10:57 ` [PATCH 08/13] xfs: xfs_sync_fsdata " Dave Chinner
2012-08-30 10:57 ` [PATCH 09/13] xfs: move xfs_quiesce_attr() into xfs_super.c Dave Chinner
2012-08-30 10:57 ` [PATCH 10/13] xfs: xfs_quiesce_attr() should quiesce the log like unmount Dave Chinner
2012-08-30 10:57 ` [PATCH 11/13] xfs: rename xfs_sync.[ch] to xfs_icache.[ch] Dave Chinner
2012-08-30 10:57 ` [PATCH 12/13] xfs: move inode locking functions to xfs_inode.c Dave Chinner
2012-08-30 10:57 ` [PATCH 13/13] xfs: remove xfs_iget.c Dave Chinner
2012-08-30 11:07 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2012-08-30 12:00 [PATCH V2 00/13] xfs: remove the xfssyncd mess Dave Chinner
2012-08-30 12:00 ` [PATCH 02/13] xfs: rename the xfs_syncd workqueue Dave Chinner
2012-09-01 23:17 ` Christoph Hellwig
2012-09-03 3:09 ` 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=1346324262-32724-3-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 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.