Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/puffs Rename slow sopreq queue into node sopreq queue...
details: https://anonhg.NetBSD.org/src/rev/9dd218754b82
branches: trunk
changeset: 780490:9dd218754b82
user: manu <manu%NetBSD.org@localhost>
date: Fri Jul 27 07:38:44 2012 +0000
description:
Rename slow sopreq queue into node sopreq queue, to refet the fact that
is only intended for postponed node reclaims.
When purging the node sopreq queue, do not call puffs_msg_sendresp(), as
it makes no sense.
diffstat:
sys/fs/puffs/puffs_msgif.c | 26 ++++++++++++--------------
sys/fs/puffs/puffs_sys.h | 4 ++--
sys/fs/puffs/puffs_vfsops.c | 6 +++---
sys/fs/puffs/puffs_vnops.c | 6 +++---
4 files changed, 20 insertions(+), 22 deletions(-)
diffs (149 lines):
diff -r b31bcbf25c28 -r 9dd218754b82 sys/fs/puffs/puffs_msgif.c
--- a/sys/fs/puffs/puffs_msgif.c Fri Jul 27 07:25:56 2012 +0000
+++ b/sys/fs/puffs/puffs_msgif.c Fri Jul 27 07:38:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_msgif.c,v 1.91 2012/07/22 17:40:46 manu Exp $ */
+/* $NetBSD: puffs_msgif.c,v 1.92 2012/07/27 07:38:44 manu Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.91 2012/07/22 17:40:46 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.92 2012/07/27 07:38:44 manu Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -846,7 +846,7 @@
* Node expiry. We come here after an inactive on an unexpired node.
* The expiry has been queued and is done in sop thread.
*/
-static bool
+static void
puffsop_expire(struct puffs_mount *pmp, puffs_cookie_t cookie)
{
struct vnode *vp;
@@ -863,7 +863,7 @@
vrele(vp);
}
- return false;
+ return;
}
static void
@@ -1058,11 +1058,9 @@
mutex_enter(&pmp->pmp_sopmtx);
for (keeprunning = true; keeprunning; ) {
/*
- * We have a higher priority queue for flush and umount
- * and a lower priority queue for reclaims. Request on
- * slower queue are not honoured before clock reaches
- * psopr_at. This code assumes that requests are ordered
- * by psopr_at in queues.
+ * We have a fast queue for flush and umount, and a node
+ * queue for delayes node reclaims. Requests on node queue * are not honoured before clock reaches psopr_at. This
+ * code assumes that requests are ordered by psopr_at.
*/
do {
psopr = TAILQ_FIRST(&pmp->pmp_sopfastreqs);
@@ -1072,9 +1070,9 @@
break;
}
- psopr = TAILQ_FIRST(&pmp->pmp_sopslowreqs);
+ psopr = TAILQ_FIRST(&pmp->pmp_sopnodereqs);
if ((psopr != NULL) && TIMED_OUT(psopr->psopr_at)) {
- TAILQ_REMOVE(&pmp->pmp_sopslowreqs,
+ TAILQ_REMOVE(&pmp->pmp_sopnodereqs,
psopr, psopr_entries);
break;
}
@@ -1123,10 +1121,10 @@
mutex_enter(&pmp->pmp_sopmtx);
}
- while ((psopr = TAILQ_FIRST(&pmp->pmp_sopslowreqs)) != NULL) {
- TAILQ_REMOVE(&pmp->pmp_sopslowreqs, psopr, psopr_entries);
+ while ((psopr = TAILQ_FIRST(&pmp->pmp_sopnodereqs)) != NULL) {
+ TAILQ_REMOVE(&pmp->pmp_sopnodereqs, psopr, psopr_entries);
mutex_exit(&pmp->pmp_sopmtx);
- puffs_msg_sendresp(pmp, &psopr->psopr_preq, ENXIO);
+ KASSERT(psopr->psopr_sopreq == PUFFS_SOPREQ_EXPIRE);
kmem_free(psopr, sizeof(*psopr));
mutex_enter(&pmp->pmp_sopmtx);
}
diff -r b31bcbf25c28 -r 9dd218754b82 sys/fs/puffs/puffs_sys.h
--- a/sys/fs/puffs/puffs_sys.h Fri Jul 27 07:25:56 2012 +0000
+++ b/sys/fs/puffs/puffs_sys.h Fri Jul 27 07:38:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_sys.h,v 1.80 2012/07/21 05:17:10 manu Exp $ */
+/* $NetBSD: puffs_sys.h,v 1.81 2012/07/27 07:38:44 manu Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@@ -176,7 +176,7 @@
kcondvar_t pmp_sopcv;
int pmp_sopthrcount;
TAILQ_HEAD(, puffs_sopreq) pmp_sopfastreqs;
- TAILQ_HEAD(, puffs_sopreq) pmp_sopslowreqs;
+ TAILQ_HEAD(, puffs_sopreq) pmp_sopnodereqs;
bool pmp_docompat;
};
diff -r b31bcbf25c28 -r 9dd218754b82 sys/fs/puffs/puffs_vfsops.c
--- a/sys/fs/puffs/puffs_vfsops.c Fri Jul 27 07:25:56 2012 +0000
+++ b/sys/fs/puffs/puffs_vfsops.c Fri Jul 27 07:38:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $ */
+/* $NetBSD: puffs_vfsops.c,v 1.105 2012/07/27 07:38:44 manu Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.104 2012/07/27 07:25:56 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.105 2012/07/27 07:38:44 manu Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -309,7 +309,7 @@
TAILQ_INIT(&pmp->pmp_msg_touser);
TAILQ_INIT(&pmp->pmp_msg_replywait);
TAILQ_INIT(&pmp->pmp_sopfastreqs);
- TAILQ_INIT(&pmp->pmp_sopslowreqs);
+ TAILQ_INIT(&pmp->pmp_sopnodereqs);
if ((error = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,
puffs_sop_thread, pmp, NULL, "puffsop")) != 0)
diff -r b31bcbf25c28 -r 9dd218754b82 sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Fri Jul 27 07:25:56 2012 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Fri Jul 27 07:38:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.170 2012/07/23 19:06:10 manu Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.171 2012/07/27 07:38:44 manu Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.170 2012/07/23 19:06:10 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.171 2012/07/27 07:38:44 manu Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -1279,7 +1279,7 @@
if (pmp->pmp_sopthrcount == 0) {
kmem_free(psopr, sizeof(*psopr));
} else {
- TAILQ_INSERT_TAIL(&pmp->pmp_sopslowreqs,
+ TAILQ_INSERT_TAIL(&pmp->pmp_sopnodereqs,
psopr, psopr_entries);
pnode->pn_stat |= PNODE_SOPEXP;
}
Home |
Main Index |
Thread Index |
Old Index