summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2007-07-02 10:24:17 +0000
committerpooka <pooka@NetBSD.org>2007-07-02 10:24:17 +0000
commitdf6f052d2fe1028a6696309cb28bf240021a636a (patch)
tree792fcac9c41633c813226e3990240d09c0704c6a
parentd0f8b29da6ee86750a7a391424855acded841cef (diff)
Get rid of the "int *refs" parameter to inactive: the same can be
accomplished now with puffs_setbacks.
-rw-r--r--lib/libpuffs/dispatcher.c8
-rw-r--r--lib/libpuffs/puffs.c7
-rw-r--r--lib/libpuffs/puffs.h9
-rw-r--r--sys/fs/puffs/puffs_msgif.h5
-rw-r--r--sys/fs/puffs/puffs_vnops.c16
5 files changed, 19 insertions, 26 deletions
diff --git a/lib/libpuffs/dispatcher.c b/lib/libpuffs/dispatcher.c
index 63b672ab986..26ce51f2258 100644
--- a/lib/libpuffs/dispatcher.c
+++ b/lib/libpuffs/dispatcher.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dispatcher.c,v 1.9 2007/07/01 18:39:39 pooka Exp $ */
+/* $NetBSD: dispatcher.c,v 1.10 2007/07/02 10:24:17 pooka Exp $ */
/*
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: dispatcher.c,v 1.9 2007/07/01 18:39:39 pooka Exp $");
+__RCSID("$NetBSD: dispatcher.c,v 1.10 2007/07/02 10:24:17 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -795,9 +795,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
break;
}
- auxt->pvnr_backendrefs = 1; /* safe default */
- error = pops->puffs_node_inactive(pcc,
- opcookie, pcid, &auxt->pvnr_backendrefs);
+ error = pops->puffs_node_inactive(pcc, opcookie, pcid);
break;
}
diff --git a/lib/libpuffs/puffs.c b/lib/libpuffs/puffs.c
index ead49613612..aac801acb4d 100644
--- a/lib/libpuffs/puffs.c
+++ b/lib/libpuffs/puffs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs.c,v 1.53 2007/06/11 06:13:34 pooka Exp $ */
+/* $NetBSD: puffs.c,v 1.54 2007/07/02 10:24:18 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: puffs.c,v 1.53 2007/06/11 06:13:34 pooka Exp $");
+__RCSID("$NetBSD: puffs.c,v 1.54 2007/07/02 10:24:18 pooka Exp $");
#endif /* !lint */
#include <sys/param.h>
@@ -297,7 +297,8 @@ puffs_setback(struct puffs_cc *pcc, int whatback)
preq->preq_optype == PUFFS_VN_OPEN ||
preq->preq_optype == PUFFS_VN_MMAP ||
preq->preq_optype == PUFFS_VN_REMOVE ||
- preq->preq_optype == PUFFS_VN_RMDIR));
+ preq->preq_optype == PUFFS_VN_RMDIR ||
+ preq->preq_optype == PUFFS_VN_INACTIVE));
preq->preq_setbacks |= whatback & PUFFS_SETBACK_MASK;
}
diff --git a/lib/libpuffs/puffs.h b/lib/libpuffs/puffs.h
index 79f8ef23926..b0fce1b1010 100644
--- a/lib/libpuffs/puffs.h
+++ b/lib/libpuffs/puffs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs.h,v 1.69 2007/07/01 18:39:39 pooka Exp $ */
+/* $NetBSD: puffs.h,v 1.70 2007/07/02 10:24:18 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -126,6 +126,7 @@ struct puffs_cn {
#define pcn_pid pcn_pkcnp->pkcn_pid
#define pcn_name pcn_pkcnp->pkcn_name
#define pcn_namelen pcn_pkcnp->pkcn_namelen
+#define pcn_consume pcn_pkcnp->pkcn_consume
/*
* Puffs options to mount
@@ -215,7 +216,7 @@ struct puffs_ops {
int (*puffs_node_reclaim)(struct puffs_cc *,
void *, const struct puffs_cid *);
int (*puffs_node_inactive)(struct puffs_cc *,
- void *, const struct puffs_cid *, int *);
+ void *, const struct puffs_cid *);
int (*puffs_node_print)(struct puffs_cc *,
void *);
int (*puffs_node_pathconf)(struct puffs_cc *,
@@ -350,7 +351,7 @@ enum {
int fsname##_node_reclaim(struct puffs_cc *, \
void *, const struct puffs_cid *); \
int fsname##_node_inactive(struct puffs_cc *, \
- void *, const struct puffs_cid *, int *); \
+ void *, const struct puffs_cid *); \
int fsname##_node_print(struct puffs_cc *, \
void *); \
int fsname##_node_pathconf(struct puffs_cc *, \
@@ -381,7 +382,7 @@ enum {
PUFFSOP_PROTOS(puffs_null) /* XXX */
-#define PUFFS_DEVEL_LIBVERSION 21
+#define PUFFS_DEVEL_LIBVERSION 22
#define puffs_init(a,b,c,d) \
_puffs_init(PUFFS_DEVEL_LIBVERSION,a,b,c,d)
diff --git a/sys/fs/puffs/puffs_msgif.h b/sys/fs/puffs/puffs_msgif.h
index dedfa053926..0cd8d205a36 100644
--- a/sys/fs/puffs/puffs_msgif.h
+++ b/sys/fs/puffs/puffs_msgif.h
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_msgif.h,v 1.38 2007/07/01 22:54:16 pooka Exp $ */
+/* $NetBSD: puffs_msgif.h,v 1.39 2007/07/02 10:24:17 pooka Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@@ -83,7 +83,7 @@ enum {
#define PUFFS_VN_MAX PUFFS_VN_SETEXTATTR
#define PUFFSDEVELVERS 0x80000000
-#define PUFFSVERSION 13
+#define PUFFSVERSION 14
#define PUFFSNAMESIZE 32
struct puffs_kargs {
unsigned int pa_vers;
@@ -656,7 +656,6 @@ struct puffs_vnreq_inactive {
struct puffs_req pvn_pr;
struct puffs_kcid pvnr_cid; /* OUT */
- int pvnr_backendrefs; /* IN */
};
struct puffs_vnreq_print {
diff --git a/sys/fs/puffs/puffs_vnops.c b/sys/fs/puffs/puffs_vnops.c
index 0fb7e4ce79f..78de4a4a96b 100644
--- a/sys/fs/puffs/puffs_vnops.c
+++ b/sys/fs/puffs/puffs_vnops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.84 2007/07/01 23:30:42 pooka Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.85 2007/07/02 10:24:17 pooka 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.84 2007/07/01 23:30:42 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.85 2007/07/02 10:24:17 pooka Exp $");
#include <sys/param.h>
#include <sys/fstrans.h>
@@ -818,7 +818,7 @@ puffs_inactive(void *v)
} */ *ap = v;
struct puffs_mount *pmp;
struct puffs_node *pnode;
- int rv, vnrefs, call;
+ int rv, call;
PUFFS_VNREQ(inactive);
@@ -850,19 +850,13 @@ puffs_inactive(void *v)
rv = 1; /* see below */
pnode->pn_stat &= ~PNODE_DOINACT;
- /* can't trust userspace return value? simulate safe answer */
- if (rv)
- vnrefs = 1;
- else
- vnrefs = inactive_arg.pvnr_backendrefs;
-
VOP_UNLOCK(ap->a_vp, 0);
/*
- * user server thinks it's gone? then don't be afraid care,
+ * file server thinks it's gone? then don't be afraid care,
* node's life was already all it would ever be
*/
- if (vnrefs == 0 || (pnode->pn_stat & PNODE_NOREFS)) {
+ if (pnode->pn_stat & PNODE_NOREFS) {
pnode->pn_stat |= PNODE_DYING;
vrecycle(ap->a_vp, NULL, ap->a_l);
}