Remove "puffs_cid" from the puffs interface following l-removal

from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
This commit is contained in:
pooka 2007-11-27 11:31:17 +00:00
parent 6c09f19fb4
commit 6a3d9a187d
18 changed files with 157 additions and 265 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dispatcher.c,v 1.21 2007/10/31 16:09:09 pooka Exp $ */
/* $NetBSD: dispatcher.c,v 1.22 2007/11/27 11:31:19 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.21 2007/10/31 16:09:09 pooka Exp $");
__RCSID("$NetBSD: dispatcher.c,v 1.22 2007/11/27 11:31:19 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -278,11 +278,9 @@ puffs_calldispatcher(struct puffs_cc *pcc)
case PUFFS_VFS_UNMOUNT:
{
struct puffs_vfsmsg_unmount *auxt = auxbuf;
PUFFS_MAKECID(pcid, &auxt->pvfsr_cid);
PU_SETSTATE(pu, PUFFS_STATE_UNMOUNTING);
error = pops->puffs_fs_unmount(pcc,
auxt->pvfsr_flags, pcid);
error = pops->puffs_fs_unmount(pcc, auxt->pvfsr_flags);
if (!error)
PU_SETSTATE(pu, PUFFS_STATE_UNMOUNTED);
else
@ -293,10 +291,8 @@ puffs_calldispatcher(struct puffs_cc *pcc)
case PUFFS_VFS_STATVFS:
{
struct puffs_vfsmsg_statvfs *auxt = auxbuf;
PUFFS_MAKECID(pcid, &auxt->pvfsr_cid);
error = pops->puffs_fs_statvfs(pcc,
&auxt->pvfsr_sb, pcid);
error = pops->puffs_fs_statvfs(pcc, &auxt->pvfsr_sb);
break;
}
@ -304,10 +300,9 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vfsmsg_sync *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvfsr_cred);
PUFFS_MAKECID(pcid, &auxt->pvfsr_cid);
error = pops->puffs_fs_sync(pcc,
auxt->pvfsr_waitfor, pcr, pcid);
auxt->pvfsr_waitfor, pcr);
break;
}
@ -494,7 +489,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_open *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_open == NULL) {
error = 0;
@ -502,7 +496,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_open(pcc,
opcookie, auxt->pvnr_mode, pcr, pcid);
opcookie, auxt->pvnr_mode, pcr);
break;
}
@ -510,8 +504,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_close *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_close == NULL) {
error = 0;
@ -519,7 +511,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_close(pcc,
opcookie, auxt->pvnr_fflag, pcr, pcid);
opcookie, auxt->pvnr_fflag, pcr);
break;
}
@ -527,8 +519,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_access *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_access == NULL) {
error = 0;
@ -536,7 +526,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_access(pcc,
opcookie, auxt->pvnr_mode, pcr, pcid);
opcookie, auxt->pvnr_mode, pcr);
break;
}
@ -544,8 +534,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_getattr *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_getattr == NULL) {
error = EOPNOTSUPP;
@ -553,7 +541,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_getattr(pcc,
opcookie, &auxt->pvnr_va, pcr, pcid);
opcookie, &auxt->pvnr_va, pcr);
break;
}
@ -561,8 +549,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_setattr *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_setattr == NULL) {
error = EOPNOTSUPP;
@ -570,7 +556,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_setattr(pcc,
opcookie, &auxt->pvnr_va, pcr, pcid);
opcookie, &auxt->pvnr_va, pcr);
break;
}
@ -578,8 +564,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_mmap *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_mmap == NULL) {
error = 0;
@ -587,7 +571,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_mmap(pcc,
opcookie, auxt->pvnr_prot, pcr, pcid);
opcookie, auxt->pvnr_prot, pcr);
break;
}
@ -595,8 +579,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
{
struct puffs_vnmsg_fsync *auxt = auxbuf;
PUFFS_MAKECRED(pcr, &auxt->pvnr_cred);
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_fsync == NULL) {
error = 0;
@ -605,7 +587,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
error = pops->puffs_node_fsync(pcc, opcookie, pcr,
auxt->pvnr_flags, auxt->pvnr_offlo,
auxt->pvnr_offhi, pcid);
auxt->pvnr_offhi);
break;
}
@ -899,29 +881,25 @@ puffs_calldispatcher(struct puffs_cc *pcc)
case PUFFS_VN_RECLAIM:
{
struct puffs_vnmsg_reclaim *auxt = auxbuf;
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_reclaim == NULL) {
error = 0;
break;
}
error = pops->puffs_node_reclaim(pcc, opcookie, pcid);
error = pops->puffs_node_reclaim(pcc, opcookie);
break;
}
case PUFFS_VN_INACTIVE:
{
struct puffs_vnmsg_inactive *auxt = auxbuf;
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_inactive == NULL) {
error = EOPNOTSUPP;
break;
}
error = pops->puffs_node_inactive(pcc, opcookie, pcid);
error = pops->puffs_node_inactive(pcc, opcookie);
break;
}
@ -1011,7 +989,6 @@ puffs_calldispatcher(struct puffs_cc *pcc)
case PUFFS_VN_POLL:
{
struct puffs_vnmsg_poll *auxt = auxbuf;
PUFFS_MAKECID(pcid, &auxt->pvnr_cid);
if (pops->puffs_node_poll == NULL) {
error = 0;
@ -1024,7 +1001,7 @@ puffs_calldispatcher(struct puffs_cc *pcc)
}
error = pops->puffs_node_poll(pcc,
opcookie, &auxt->pvnr_events, pcid);
opcookie, &auxt->pvnr_events);
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: null.c,v 1.22 2007/11/05 16:53:00 pooka Exp $ */
/* $NetBSD: null.c,v 1.23 2007/11/27 11:31:19 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: null.c,v 1.22 2007/11/05 16:53:00 pooka Exp $");
__RCSID("$NetBSD: null.c,v 1.23 2007/11/27 11:31:19 pooka Exp $");
#endif /* !lint */
/*
@ -187,8 +187,7 @@ puffs_null_setops(struct puffs_ops *pops)
/*ARGSUSED*/
int
puffs_null_fs_statvfs(struct puffs_cc *pcc, struct statvfs *svfsb,
const struct puffs_cid *pcid)
puffs_null_fs_statvfs(struct puffs_cc *pcc, struct statvfs *svfsb)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
@ -280,7 +279,7 @@ puffs_null_node_mknod(struct puffs_cc *pcc, void *opc,
/*ARGSUSED*/
int
puffs_null_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
const struct puffs_cred *pcred, const struct puffs_cid *pcid)
const struct puffs_cred *pcred)
{
struct puffs_node *pn = opc;
struct stat sb;
@ -295,8 +294,7 @@ puffs_null_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
/*ARGSUSED*/
int
puffs_null_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcred,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcred)
{
struct puffs_node *pn = opc;
int rv;
@ -314,7 +312,7 @@ puffs_null_node_setattr(struct puffs_cc *pcc, void *opc,
int
puffs_null_node_fsync(struct puffs_cc *pcc, void *opc,
const struct puffs_cred *pcred, int how,
off_t offlo, off_t offhi, const struct puffs_cid *pcid)
off_t offlo, off_t offhi)
{
struct puffs_node *pn = opc;
int fd, rv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs.h,v 1.94 2007/11/16 18:35:10 pooka Exp $ */
/* $NetBSD: puffs.h,v 1.95 2007/11/27 11:31:19 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -156,12 +156,10 @@ extern const struct mntopt puffsmopts[]; /* puffs.c */
/* callbacks for operations */
struct puffs_ops {
int (*puffs_fs_unmount)(struct puffs_cc *, int,
const struct puffs_cid *);
int (*puffs_fs_statvfs)(struct puffs_cc *,
struct statvfs *, const struct puffs_cid *);
int (*puffs_fs_unmount)(struct puffs_cc *, int);
int (*puffs_fs_statvfs)(struct puffs_cc *, struct statvfs *);
int (*puffs_fs_sync)(struct puffs_cc *, int,
const struct puffs_cred *, const struct puffs_cid *);
const struct puffs_cred *);
int (*puffs_fs_fhtonode)(struct puffs_cc *, void *, size_t,
struct puffs_newinfo *);
int (*puffs_fs_nodetofh)(struct puffs_cc *, void *cookie,
@ -177,25 +175,20 @@ struct puffs_ops {
void *, struct puffs_newinfo *, const struct puffs_cn *,
const struct vattr *);
int (*puffs_node_open)(struct puffs_cc *,
void *, int, const struct puffs_cred *, const struct puffs_cid *);
void *, int, const struct puffs_cred *);
int (*puffs_node_close)(struct puffs_cc *,
void *, int, const struct puffs_cred *, const struct puffs_cid *);
void *, int, const struct puffs_cred *);
int (*puffs_node_access)(struct puffs_cc *,
void *, int, const struct puffs_cred *, const struct puffs_cid *);
void *, int, const struct puffs_cred *);
int (*puffs_node_getattr)(struct puffs_cc *,
void *, struct vattr *, const struct puffs_cred *,
const struct puffs_cid *);
void *, struct vattr *, const struct puffs_cred *);
int (*puffs_node_setattr)(struct puffs_cc *,
void *, const struct vattr *, const struct puffs_cred *,
const struct puffs_cid *);
int (*puffs_node_poll)(struct puffs_cc *, void *, int *,
const struct puffs_cid *);
void *, const struct vattr *, const struct puffs_cred *);
int (*puffs_node_poll)(struct puffs_cc *, void *, int *);
int (*puffs_node_mmap)(struct puffs_cc *,
void *, vm_prot_t, const struct puffs_cred *,
const struct puffs_cid *);
void *, vm_prot_t, const struct puffs_cred *);
int (*puffs_node_fsync)(struct puffs_cc *,
void *, const struct puffs_cred *, int, off_t, off_t,
const struct puffs_cid *);
void *, const struct puffs_cred *, int, off_t, off_t);
int (*puffs_node_seek)(struct puffs_cc *,
void *, off_t, off_t, const struct puffs_cred *);
int (*puffs_node_remove)(struct puffs_cc *,
@ -219,10 +212,8 @@ struct puffs_ops {
const struct puffs_cred *, int *, off_t *, size_t *);
int (*puffs_node_readlink)(struct puffs_cc *,
void *, const struct puffs_cred *, char *, size_t *);
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 (*puffs_node_reclaim)(struct puffs_cc *, void *);
int (*puffs_node_inactive)(struct puffs_cc *, void *);
int (*puffs_node_print)(struct puffs_cc *,
void *);
int (*puffs_node_pathconf)(struct puffs_cc *,
@ -286,12 +277,10 @@ enum {
*/
#define PUFFSOP_PROTOS(fsname) \
int fsname##_fs_unmount(struct puffs_cc *, int, \
const struct puffs_cid *); \
int fsname##_fs_statvfs(struct puffs_cc *, \
struct statvfs *, const struct puffs_cid *); \
int fsname##_fs_unmount(struct puffs_cc *, int); \
int fsname##_fs_statvfs(struct puffs_cc *, struct statvfs *); \
int fsname##_fs_sync(struct puffs_cc *, int, \
const struct puffs_cred *cred, const struct puffs_cid *); \
const struct puffs_cred *cred); \
int fsname##_fs_fhtonode(struct puffs_cc *, void *, size_t, \
struct puffs_newinfo *); \
int fsname##_fs_nodetofh(struct puffs_cc *, void *cookie, \
@ -307,28 +296,20 @@ enum {
void *, struct puffs_newinfo *, const struct puffs_cn *, \
const struct vattr *); \
int fsname##_node_open(struct puffs_cc *, \
void *, int, const struct puffs_cred *, \
const struct puffs_cid *); \
void *, int, const struct puffs_cred *); \
int fsname##_node_close(struct puffs_cc *, \
void *, int, const struct puffs_cred *, \
const struct puffs_cid *); \
void *, int, const struct puffs_cred *); \
int fsname##_node_access(struct puffs_cc *, \
void *, int, const struct puffs_cred *, \
const struct puffs_cid *); \
void *, int, const struct puffs_cred *); \
int fsname##_node_getattr(struct puffs_cc *, \
void *, struct vattr *, const struct puffs_cred *, \
const struct puffs_cid *); \
void *, struct vattr *, const struct puffs_cred *); \
int fsname##_node_setattr(struct puffs_cc *, \
void *, const struct vattr *, const struct puffs_cred *, \
const struct puffs_cid *); \
int fsname##_node_poll(struct puffs_cc *, void *, int *, \
const struct puffs_cid *); \
void *, const struct vattr *, const struct puffs_cred *); \
int fsname##_node_poll(struct puffs_cc *, void *, int *); \
int fsname##_node_mmap(struct puffs_cc *, \
void *, vm_prot_t, const struct puffs_cred *, \
const struct puffs_cid *); \
void *, vm_prot_t, const struct puffs_cred *); \
int fsname##_node_fsync(struct puffs_cc *, \
void *, const struct puffs_cred *, int, off_t, off_t, \
const struct puffs_cid *); \
void *, const struct puffs_cred *, int, off_t, off_t); \
int fsname##_node_seek(struct puffs_cc *, \
void *, off_t, off_t, const struct puffs_cred *); \
int fsname##_node_remove(struct puffs_cc *, \
@ -351,10 +332,8 @@ enum {
const struct puffs_cred *, int *, off_t *, size_t *); \
int fsname##_node_readlink(struct puffs_cc *, \
void *, const struct puffs_cred *, char *, size_t *); \
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 fsname##_node_reclaim(struct puffs_cc *, void *); \
int fsname##_node_inactive(struct puffs_cc *, void *); \
int fsname##_node_print(struct puffs_cc *, \
void *); \
int fsname##_node_pathconf(struct puffs_cc *, \
@ -379,7 +358,7 @@ enum {
PUFFSOP_PROTOS(puffs_null) /* XXX */
#define PUFFS_DEVEL_LIBVERSION 29
#define PUFFS_DEVEL_LIBVERSION 30
#define puffs_init(a,b,c,d,e) \
_puffs_init(PUFFS_DEVEL_LIBVERSION,a,b,c,d,e)
@ -489,14 +468,12 @@ void puffs_null_setops(struct puffs_ops *);
/*
* generic/dummy routines applicable for some file systems
*/
int puffs_fsnop_unmount(struct puffs_cc *, int, const struct puffs_cid *);
int puffs_fsnop_statvfs(struct puffs_cc *, struct statvfs *,
const struct puffs_cid *);
int puffs_fsnop_unmount(struct puffs_cc *, int);
int puffs_fsnop_statvfs(struct puffs_cc *, struct statvfs *);
void puffs_zerostatvfs(struct statvfs *);
int puffs_fsnop_sync(struct puffs_cc *, int waitfor,
const struct puffs_cred *, const struct puffs_cid *);
int puffs_genfs_node_reclaim(struct puffs_cc *, void *,
const struct puffs_cid *);
const struct puffs_cred *);
int puffs_genfs_node_reclaim(struct puffs_cc *, void *);
/*
* Subroutine stuff

View File

@ -1,4 +1,4 @@
.\" $NetBSD: puffs_ops.3,v 1.15 2007/07/31 21:48:18 pooka Exp $
.\" $NetBSD: puffs_ops.3,v 1.16 2007/11/27 11:31:19 pooka Exp $
.\"
.\" Copyright (c) 2007 Antti Kantee. All rights reserved.
.\"
@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd July 31, 2007
.Dd November 27, 2007
.Dt PUFFS_OPS 3
.Os
.Sh NAME
@ -35,12 +35,11 @@
.In puffs.h
.Ft int
.Fo puffs_fs_statvfs
.Fa "struct puffs_cc *pcc" "struct statvfs *sbp" "const struct puffs_cid *pcid"
.Fa "struct puffs_cc *pcc" "struct statvfs *sbp"
.Fc
.Ft int
.Fo puffs_fs_sync
.Fa "struct puffs_cc *pcc" "int waitfor" "const struct puffs_cred *pcr"
.Fa "const struct puffs_cid *pcid"
.Fc
.Ft int
.Fo puffs_fs_fhtonode
@ -55,7 +54,7 @@
.Fn puffs_fs_suspend "struct puffs_cc *pcc" "int status"
.Ft int
.Fo puffs_fs_unmount
.Fa "struct puffs_cc *pcc" "int flags" "const struct puffs_cid *pcid"
.Fa "struct puffs_cc *pcc" "int flags"
.Fc
.Ft int
.Fo puffs_node_lookup
@ -75,42 +74,41 @@
.Ft int
.Fo puffs_node_open
.Fa "struct puffs_cc *pcc" "void *opc" "int mode"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_close
.Fa "struct puffs_cc *pcc" "void *opc" "int flags"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_access
.Fa "struct puffs_cc *pcc" "void *opc" "int mode"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_getattr
.Fa "struct puffs_cc *pcc" "void *opc" "struct vattr *vap"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_setattr
.Fa "struct puffs_cc *pcc" "void *opc" "const struct vattr *vap"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_poll
.Fa "struct puffs_cc *pcc" "void *opc" "int *events"
.Fa "const struct puffs_cid *pcid"
.Fc
.Ft int
.Fo puffs_node_mmap
.Fa "struct puffs_cc *pcc" "void *opc" "int flags"
.Fa "const struct puffs_cred *pcr" "const struct puffs_cid *pcid"
.Fa "const struct puffs_cred *pcr"
.Fc
.Ft int
.Fo puffs_node_fsync
.Fa "struct puffs_cc *pcc" "void *opc" "const struct puffs_cred *pcr"
.Fa "int flags" "off_t offlo" "off_t offhi" "const struct puffs_cid *pcid"
.Fa "int flags" "off_t offlo" "off_t offhi"
.Fc
.Ft int
.Fo puffs_node_seek
@ -174,11 +172,11 @@
.Fn puffs_node_print "struct puffs_cc *pcc" "void *opc"
.Ft int
.Fo puffs_node_reclaim
.Fa "struct puffs_cc *pcc" "void *opc" "const struct puffs_cid *pcid"
.Fa "struct puffs_cc *pcc" "void *opc"
.Fc
.Ft int
.Fo puffs_node_inactive
.Fa "struct puffs_cc *pcc" "void *opc" "const struct puffs_cid *pcid"
.Fa "struct puffs_cc *pcc" "void *opc"
.Fc
.Ft void
.Fn puffs_setback "struct puffs_cc *pcc" "int op"
@ -214,7 +212,7 @@ name using the macro
.Fn PUFFSOP_PROTOS fsname .
.Ss File system callbacks (puffs_fs)
.Bl -tag -width xxxx
.It Fn puffs_fs_statvfs "pcc" "sbp" "pcid"
.It Fn puffs_fs_statvfs "pcc" "sbp"
The following fields of the argument
.Fa sbp
need to be filled:
@ -234,9 +232,7 @@ need to be filled:
* fsfilcnt_t f_fresvd; file nodes reserved for root
.Ed
The process requiring this information is given by
.Fa pcid .
.It Fn puffs_fs_sync "pcc" "waitfor" "pcr" "pcid"
.It Fn puffs_fs_sync "pcc" "waitfor" "pcr"
All the dirty buffers that have been cached at the file server
level including metadata should be committed to stable storage.
The
@ -305,7 +301,7 @@ Called when file system suspension reaches various phases.
See
.Xr puffs_suspend 3
for more information.
.It Fn puffs_fs_unmount "pcc" "flags" "pcid"
.It Fn puffs_fs_unmount "pcc" "flags"
Unmount the file system.
The kernel has assumedly flushed all cached data when this callback
is executed.
@ -423,7 +419,7 @@ file, directory and device special file, respectively.
.Pp
In case of mknod, the device identifier can be found in
.Fa va-\*[Gt]va_rdev .
.It Fn puffs_node_open "pcc" "opc" "mode" "pcr" "pcid"
.It Fn puffs_node_open "pcc" "opc" "mode" "pcr"
Open the node denoted by the cookie
.Fa opc .
The parameter
@ -434,12 +430,12 @@ was called with, e.g.
.Dv O_APPEND
and
.Dv O_NONBLOCK .
.It Fn puffs_node_close "pcc" "opc" "flags" "pcr" "pcid"
.It Fn puffs_node_close "pcc" "opc" "flags" "pcr"
Close a node.
The parameter
.Fa flags
parameter describes the flags that the file was opened with.
.It Fn puffs_node_access "pcc" "opc" "mode" "pcr" "pcid"
.It Fn puffs_node_access "pcc" "opc" "mode" "pcr"
Check if the credentials of
.Fa pcr
have the right to perform the operation specified by
@ -454,12 +450,12 @@ can specify read, write or execute by
and
.Dv PUFFS_VEXEC ,
respectively.
.It Fn puffs_node_getattr "pcc" "opc" "va" "pcr" "pcid"
.It Fn puffs_node_getattr "pcc" "opc" "va" "pcr"
The attributes of the node specified by
.Fa opc
must be copied to the space pointed by
.Fa va .
.It Fn puffs_node_setattr "pcc" "opc" "va" "pcr" "pcid"
.It Fn puffs_node_setattr "pcc" "opc" "va" "pcr"
The attributes for the node specified by
.Fa opc
must be set to those contained in
@ -469,7 +465,7 @@ Only fields of
which contain a value different from
.Dv PUFFS_VNOVAL
(typecast to the field's type!) contain a valid value.
.It Fn puffs_node_poll pcc opc events pcid
.It Fn puffs_node_poll "pcc" "opc" "events"
Poll for events on node
.Ar opc .
If
@ -498,12 +494,12 @@ At this level, however, the timeout is not supplied.
In case input does not arrive, the file system should periodically
unblock and return 0 new events to avoid hanging forever.
This will hopefully be better supported by libpuffs in the future.
.It Fn puffs_node_mmap "pcc" "opc" "flags" "pcr" "pcid"
.It Fn puffs_node_mmap "pcc" "opc" "flags" "pcr"
Called when a regular file is being memory mapped by
.Xr mmap 2 .
.Fa flags
is currently always 0.
.It Fn puffs_node_fsync "pcc" "opc" "pcr" "flags" "offlo" "offhi" "pcid"
.It Fn puffs_node_fsync "pcc" "opc" "pcr" "flags" "offlo" "offhi"
Sychronize a node's contents onto stable storage.
This is necessary only if the file server caches some information
before committing it.
@ -707,23 +703,19 @@ is specified, the data should be appended to the end of the file.
.It Fn puffs_node_print "pcc" "opc"
Print information about node. This is used only for kernel-initiated
diagnostic purposes.
.It Fn puffs_node_reclaim "pcc" "opc" "pcid"
.It Fn puffs_node_reclaim "pcc" "opc"
The kernel will no longer reference the cookie and resources associated
with it may be freed.
In case the file
.Fa opc
has a link count of zero, it may be safely removed now.
.It Fn puffs_node_inactive "pcc" "opc" "pcid" "refcount"
.It Fn puffs_node_inactive "pcc" "opc"
The node
.Fa opc
has lost its last reference in the kernel.
However, the cookie must still remain valid until
.Fn puffs_node_reclaim
is called.
The file system should return its internal reference count on the file
(usually number of links to the file) in
.Fa refcount .
If this is zero, the kernel will call reclaim immediately.
.It Fn puffs_setback pcc op
Issue a "setback" operation which will be handled when the request response
is returned to the kernel.

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr.c,v 1.19 2007/10/21 14:26:15 pooka Exp $ */
/* $NetBSD: subr.c,v 1.20 2007/11/27 11:31:20 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: subr.c,v 1.19 2007/10/21 14:26:15 pooka Exp $");
__RCSID("$NetBSD: subr.c,v 1.20 2007/11/27 11:31:20 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -81,8 +81,7 @@ puffs_nextdent(struct dirent **dent, const char *name, ino_t id, uint8_t dtype,
/*ARGSUSED*/
int
puffs_fsnop_unmount(struct puffs_cc *dontuse1, int dontuse2,
const struct puffs_cid *dontuse3)
puffs_fsnop_unmount(struct puffs_cc *dontuse1, int dontuse2)
{
/* would you like to see puffs rule again, my friend? */
@ -92,7 +91,7 @@ puffs_fsnop_unmount(struct puffs_cc *dontuse1, int dontuse2,
/*ARGSUSED*/
int
puffs_fsnop_sync(struct puffs_cc *dontuse1, int dontuse2,
const struct puffs_cred *dontuse3, const struct puffs_cid *dontuse4)
const struct puffs_cred *dontuse3)
{
return 0;
@ -100,8 +99,7 @@ puffs_fsnop_sync(struct puffs_cc *dontuse1, int dontuse2,
/*ARGSUSED*/
int
puffs_fsnop_statvfs(struct puffs_cc *dontuse1, struct statvfs *sbp,
const struct puffs_cid *dontuse2)
puffs_fsnop_statvfs(struct puffs_cc *dontuse1, struct statvfs *sbp)
{
sbp->f_bsize = sbp->f_frsize = sbp->f_iosize = 512;
@ -118,8 +116,7 @@ puffs_fsnop_statvfs(struct puffs_cc *dontuse1, struct statvfs *sbp,
*/
/*ARGSUSED2*/
int
puffs_genfs_node_reclaim(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
puffs_genfs_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
@ -136,7 +133,7 @@ void
puffs_zerostatvfs(struct statvfs *sbp)
{
puffs_fsnop_statvfs(NULL, sbp, 0);
puffs_fsnop_statvfs(NULL, sbp);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: refuse.c,v 1.83 2007/11/08 17:08:46 pooka Exp $ */
/* $NetBSD: refuse.c,v 1.84 2007/11/27 11:31:20 pooka Exp $ */
/*
* Copyright © 2007 Alistair Crooks. All rights reserved.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: refuse.c,v 1.83 2007/11/08 17:08:46 pooka Exp $");
__RCSID("$NetBSD: refuse.c,v 1.84 2007/11/27 11:31:20 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -615,7 +615,7 @@ puffs_fuse_node_lookup(struct puffs_cc *pcc, void *opc,
/* ARGSUSED3 */
static int
puffs_fuse_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs_node *pn = opc;
@ -922,8 +922,7 @@ puffs_fuse_node_link(struct puffs_cc *pcc, void *opc, void *targ,
/* ARGSUSED3 */
static int
puffs_fuse_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcr)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs_node *pn = opc;
@ -940,7 +939,7 @@ puffs_fuse_node_setattr(struct puffs_cc *pcc, void *opc,
/* ARGSUSED2 */
static int
puffs_fuse_node_open(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *cred, const struct puffs_cid *pcid)
const struct puffs_cred *cred)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs_node *pn = opc;
@ -979,7 +978,7 @@ puffs_fuse_node_open(struct puffs_cc *pcc, void *opc, int mode,
/* ARGSUSED2 */
static int
puffs_fuse_node_close(struct puffs_cc *pcc, void *opc, int fflag,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs_node *pn = opc;
@ -1154,8 +1153,7 @@ puffs_fuse_node_readdir(struct puffs_cc *pcc, void *opc, struct dirent *dent,
/* ARGSUSED */
static int
puffs_fuse_node_reclaim(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
puffs_fuse_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct puffs_node *pn = opc;
@ -1165,8 +1163,7 @@ puffs_fuse_node_reclaim(struct puffs_cc *pcc, void *opc,
/* ARGSUSED1 */
static int
puffs_fuse_fs_unmount(struct puffs_cc *pcc, int flags,
const struct puffs_cid *pcid)
puffs_fuse_fs_unmount(struct puffs_cc *pcc, int flags)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct fuse *fuse;
@ -1182,7 +1179,7 @@ puffs_fuse_fs_unmount(struct puffs_cc *pcc, int flags,
/* ARGSUSED0 */
static int
puffs_fuse_fs_sync(struct puffs_cc *pcc, int flags,
const struct puffs_cred *cr, const struct puffs_cid *pcid)
const struct puffs_cred *cr)
{
set_fuse_context_uid_gid(cr);
return 0;
@ -1190,8 +1187,7 @@ puffs_fuse_fs_sync(struct puffs_cc *pcc, int flags,
/* ARGSUSED2 */
static int
puffs_fuse_fs_statvfs(struct puffs_cc *pcc, struct statvfs *svfsb,
const struct puffs_cid *pcid)
puffs_fuse_fs_statvfs(struct puffs_cc *pcc, struct statvfs *svfsb)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct fuse *fuse;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dtfs_vfsops.c,v 1.21 2007/07/01 18:40:15 pooka Exp $ */
/* $NetBSD: dtfs_vfsops.c,v 1.22 2007/11/27 11:31:22 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -191,8 +191,7 @@ dtfs_domount(struct puffs_usermount *pu, const char *typestr)
#define ROUND(a,b) (((a) + ((b)-1)) & ~((b)-1))
#define NFILES 1024*1024
int
dtfs_fs_statvfs(struct puffs_cc *pcc, struct statvfs *sbp,
const struct puffs_cid *pcid)
dtfs_fs_statvfs(struct puffs_cc *pcc, struct statvfs *sbp)
{
struct puffs_usermount *pu;
struct rlimit rlim;
@ -303,7 +302,7 @@ dtfs_fs_suspend(struct puffs_cc *pcc, int status)
}
int
dtfs_fs_unmount(struct puffs_cc *pcc, int flags, const struct puffs_cid *pcid)
dtfs_fs_unmount(struct puffs_cc *pcc, int flags)
{
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dtfs_vnops.c,v 1.39 2007/10/11 23:03:00 pooka Exp $ */
/* $NetBSD: dtfs_vnops.c,v 1.40 2007/11/27 11:31:22 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -87,7 +87,7 @@ dtfs_node_lookup(struct puffs_cc *pcc, void *opc, struct puffs_newinfo *pni,
int
dtfs_node_access(struct puffs_cc *pcc, void *opc, int acc_mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
@ -97,8 +97,7 @@ dtfs_node_access(struct puffs_cc *pcc, void *opc, int acc_mode,
int
dtfs_node_getattr(struct puffs_cc *pcc, void *opc,
struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
struct vattr *va, const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
@ -109,8 +108,7 @@ dtfs_node_getattr(struct puffs_cc *pcc, void *opc,
int
dtfs_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
int rv;
@ -279,8 +277,7 @@ dtfs_node_readdir(struct puffs_cc *pcc, void *opc,
}
int
dtfs_node_poll(struct puffs_cc *pcc, void *opc, int *events,
const struct puffs_cid *pcid)
dtfs_node_poll(struct puffs_cc *pcc, void *opc, int *events)
{
struct dtfs_mount *dtm = puffs_cc_getspecific(pcc);
struct dtfs_poll dp;
@ -301,7 +298,7 @@ dtfs_node_poll(struct puffs_cc *pcc, void *opc, int *events,
int
dtfs_node_mmap(struct puffs_cc *pcc, void *opc, vm_prot_t prot,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct dtfs_mount *dtm = puffs_cc_getspecific(pcc);
@ -509,7 +506,7 @@ dtfs_node_write(struct puffs_cc *pcc, void *opc, uint8_t *buf,
}
int
dtfs_node_reclaim(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid)
dtfs_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct puffs_node *pn = opc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_msgif.h,v 1.60 2007/11/12 16:39:35 pooka Exp $ */
/* $NetBSD: puffs_msgif.h,v 1.61 2007/11/27 11:31:17 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -100,7 +100,7 @@ enum {
#define PUFFS_ERR_MAX PUFFS_ERR_VPTOFH
#define PUFFSDEVELVERS 0x80000000
#define PUFFSVERSION 23
#define PUFFSVERSION 24
#define PUFFSNAMESIZE 32
#define PUFFS_TYPEPREFIX "puffs|"
@ -277,21 +277,18 @@ struct puffs_vfsmsg_unmount {
struct puffs_req pvfsr_pr;
int pvfsr_flags;
struct puffs_kcid pvfsr_cid;
};
struct puffs_vfsmsg_statvfs {
struct puffs_req pvfsr_pr;
struct statvfs pvfsr_sb;
struct puffs_kcid pvfsr_cid;
};
struct puffs_vfsmsg_sync {
struct puffs_req pvfsr_pr;
struct puffs_kcred pvfsr_cred;
struct puffs_kcid pvfsr_cid;
int pvfsr_waitfor;
};
@ -371,7 +368,6 @@ struct puffs_vnmsg_open {
struct puffs_req pvn_pr;
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
int pvnr_mode; /* OUT */
};
@ -379,7 +375,6 @@ struct puffs_vnmsg_close {
struct puffs_req pvn_pr;
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
int pvnr_fflag; /* OUT */
};
@ -387,7 +382,6 @@ struct puffs_vnmsg_access {
struct puffs_req pvn_pr;
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
int pvnr_mode; /* OUT */
};
@ -397,7 +391,6 @@ struct puffs_vnmsg_setgetattr {
struct puffs_req pvn_pr;
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
struct vattr pvnr_va; /* IN/OUT (op depend) */
};
@ -433,14 +426,12 @@ struct puffs_vnmsg_poll {
struct puffs_req pvn_pr;
int pvnr_events; /* IN/OUT */
struct puffs_kcid pvnr_cid; /* OUT */
};
struct puffs_vnmsg_fsync {
struct puffs_req pvn_pr;
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
off_t pvnr_offlo; /* OUT */
off_t pvnr_offhi; /* OUT */
int pvnr_flags; /* OUT */
@ -546,14 +537,10 @@ struct puffs_vnmsg_readlink {
struct puffs_vnmsg_reclaim {
struct puffs_req pvn_pr;
struct puffs_kcid pvnr_cid; /* OUT */
};
struct puffs_vnmsg_inactive {
struct puffs_req pvn_pr;
struct puffs_kcid pvnr_cid; /* OUT */
};
struct puffs_vnmsg_print {
@ -583,7 +570,6 @@ struct puffs_vnmsg_mmap {
vm_prot_t pvnr_prot; /* OUT */
struct puffs_kcred pvnr_cred; /* OUT */
struct puffs_kcid pvnr_cid; /* OUT */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vfsops.c,v 1.71 2007/11/26 19:01:49 pooka Exp $ */
/* $NetBSD: puffs_vfsops.c,v 1.72 2007/11/27 11:31:17 pooka 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.71 2007/11/26 19:01:49 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.72 2007/11/27 11:31:17 pooka Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@ -315,7 +315,6 @@ puffs_unmount(struct mount *mp, int mntflags)
puffs_msg_setinfo(park_unmount,
PUFFSOP_VFS, PUFFS_VFS_UNMOUNT, NULL);
unmount_msg->pvfsr_flags = mntflags;
puffs_cidcvt(&unmount_msg->pvfsr_cid, curlwp);
PUFFS_MSG_ENQUEUEWAIT(pmp, park_unmount, error);
PUFFS_MSG_RELEASE(unmount);
@ -401,7 +400,6 @@ puffs_statvfs(struct mount *mp, struct statvfs *sbp)
PUFFS_MSG_ALLOC(vfs, statvfs);
puffs_msg_setinfo(park_statvfs, PUFFSOP_VFS, PUFFS_VFS_STATVFS, NULL);
puffs_cidcvt(&statvfs_msg->pvfsr_cid, curlwp);
PUFFS_MSG_ENQUEUEWAIT(pmp, park_statvfs, error);
error = checkerr(pmp, error, __func__);
@ -544,7 +542,6 @@ puffs_sync(struct mount *mp, int waitfor, struct kauth_cred *cred)
PUFFS_MSG_ALLOC(vfs, sync);
sync_msg->pvfsr_waitfor = waitfor;
puffs_credcvt(&sync_msg->pvfsr_cred, cred);
puffs_cidcvt(&sync_msg->pvfsr_cid, curlwp);
puffs_msg_setinfo(park_sync, PUFFSOP_VFS, PUFFS_VFS_SYNC, NULL);
PUFFS_MSG_ENQUEUEWAIT(pmp, park_sync, rv);

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vnops.c,v 1.120 2007/11/26 19:01:50 pooka Exp $ */
/* $NetBSD: puffs_vnops.c,v 1.121 2007/11/27 11:31:18 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.120 2007/11/26 19:01:50 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.121 2007/11/27 11:31:18 pooka Exp $");
#include <sys/param.h>
#include <sys/fstrans.h>
@ -748,7 +748,6 @@ puffs_open(void *v)
PUFFS_MSG_ALLOC(vn, open);
open_msg->pvnr_mode = mode;
puffs_credcvt(&open_msg->pvnr_cred, ap->a_cred);
puffs_cidcvt(&open_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_open, PUFFSOP_VN,
PUFFS_VN_OPEN, VPTOPNC(vp));
@ -778,7 +777,6 @@ puffs_close(void *v)
puffs_msg_setfaf(park_close);
close_msg->pvnr_fflag = ap->a_fflag;
puffs_credcvt(&close_msg->pvnr_cred, ap->a_cred);
puffs_cidcvt(&close_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_close, PUFFSOP_VN,
PUFFS_VN_CLOSE, VPTOPNC(vp));
@ -822,7 +820,6 @@ puffs_access(void *v)
PUFFS_MSG_ALLOC(vn, access);
access_msg->pvnr_mode = ap->a_mode;
puffs_credcvt(&access_msg->pvnr_cred, ap->a_cred);
puffs_cidcvt(&access_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_access, PUFFSOP_VN,
PUFFS_VN_ACCESS, VPTOPNC(vp));
@ -855,7 +852,6 @@ puffs_getattr(void *v)
PUFFS_MSG_ALLOC(vn, getattr);
vattr_null(&getattr_msg->pvnr_va);
puffs_credcvt(&getattr_msg->pvnr_cred, ap->a_cred);
puffs_cidcvt(&getattr_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_getattr, PUFFSOP_VN,
PUFFS_VN_GETATTR, VPTOPNC(vp));
@ -947,7 +943,6 @@ puffs_dosetattr(struct vnode *vp, struct vattr *vap, kauth_cred_t cred,
PUFFS_MSG_ALLOC(vn, setattr);
(void)memcpy(&setattr_msg->pvnr_va, vap, sizeof(struct vattr));
puffs_credcvt(&setattr_msg->pvnr_cred, cred);
puffs_cidcvt(&setattr_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_setattr, PUFFSOP_VN,
PUFFS_VN_SETATTR, VPTOPNC(vp));
@ -1003,7 +998,6 @@ puffs_callinactive(struct puffs_mount *pmp, void *cookie, int iaflag)
if (doinact(pmp, iaflag)) {
PUFFS_MSG_ALLOC(vn, inactive);
puffs_cidcvt(&inactive_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_inactive, PUFFSOP_VN,
PUFFS_VN_INACTIVE, cookie);
@ -1030,7 +1024,6 @@ puffs_inactive(void *v)
if (doinact(pmp, pnode->pn_stat & PNODE_DOINACT)) {
PUFFS_MSG_ALLOC(vn, inactive);
puffs_cidcvt(&inactive_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_inactive, PUFFSOP_VN,
PUFFS_VN_INACTIVE, VPTOPNC(vp));
@ -1064,7 +1057,6 @@ puffs_callreclaim(struct puffs_mount *pmp, void *cookie)
PUFFS_MSG_ALLOC(vn, reclaim);
puffs_msg_setfaf(park_reclaim);
puffs_cidcvt(&reclaim_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_reclaim, PUFFSOP_VN, PUFFS_VN_RECLAIM, cookie);
puffs_msg_enqueue(pmp, park_reclaim);
@ -1267,7 +1259,6 @@ puffs_poll(void *v)
PUFFS_MSG_ALLOC(vn, poll);
poll_msg->pvnr_events = ap->a_events;
puffs_cidcvt(&poll_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_poll, PUFFSOP_VN,
PUFFS_VN_POLL, VPTOPNC(vp));
puffs_msg_setcall(park_poll, puffs_parkdone_poll, pn);
@ -1357,7 +1348,6 @@ puffs_fsync(void *v)
fsync_msg->pvnr_flags = ap->a_flags;
fsync_msg->pvnr_offlo = ap->a_offlo;
fsync_msg->pvnr_offhi = ap->a_offhi;
puffs_cidcvt(&fsync_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_fsync, PUFFSOP_VN,
PUFFS_VN_FSYNC, VPTOPNC(vp));
@ -2343,7 +2333,6 @@ puffs_mmap(void *v)
PUFFS_MSG_ALLOC(vn, mmap);
mmap_msg->pvnr_prot = ap->a_prot;
puffs_credcvt(&mmap_msg->pvnr_cred, ap->a_cred);
puffs_cidcvt(&mmap_msg->pvnr_cid, curlwp);
puffs_msg_setinfo(park_mmap, PUFFSOP_VN,
PUFFS_VN_MMAP, VPTOPNC(vp));

View File

@ -1,4 +1,4 @@
/* $NetBSD: p2k.c,v 1.29 2007/11/27 09:14:21 dogcow Exp $ */
/* $NetBSD: p2k.c,v 1.30 2007/11/27 11:31:22 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -189,8 +189,7 @@ p2k_run_fs(const char *vfsname, const char *devpath, const char *mountpath,
}
int
p2k_fs_statvfs(struct puffs_cc *pcc, struct statvfs *sbp,
const struct puffs_cid *pcid)
p2k_fs_statvfs(struct puffs_cc *pcc, struct statvfs *sbp)
{
struct mount *mp = puffs_cc_getspecific(pcc);
@ -198,7 +197,7 @@ p2k_fs_statvfs(struct puffs_cc *pcc, struct statvfs *sbp,
}
int
p2k_fs_unmount(struct puffs_cc *pcc, int flags, const struct puffs_cid *pcid)
p2k_fs_unmount(struct puffs_cc *pcc, int flags)
{
struct mount *mp = puffs_cc_getspecific(pcc);
@ -206,8 +205,7 @@ p2k_fs_unmount(struct puffs_cc *pcc, int flags, const struct puffs_cid *pcid)
}
int
p2k_fs_sync(struct puffs_cc *pcc, int waitfor,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
p2k_fs_sync(struct puffs_cc *pcc, int waitfor, const struct puffs_cred *pcr)
{
struct mount *mp = puffs_cc_getspecific(pcc);
kauth_cred_t cred;
@ -336,7 +334,7 @@ p2k_node_mknod(struct puffs_cc *pcc, void *opc, struct puffs_newinfo *pni,
int
p2k_node_open(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
kauth_cred_t cred;
int rv;
@ -352,7 +350,7 @@ p2k_node_open(struct puffs_cc *pcc, void *opc, int mode,
int
p2k_node_close(struct puffs_cc *pcc, void *opc, int flags,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
kauth_cred_t cred;
int rv;
@ -368,7 +366,7 @@ p2k_node_close(struct puffs_cc *pcc, void *opc, int flags,
int
p2k_node_access(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
kauth_cred_t cred;
int rv;
@ -384,7 +382,7 @@ p2k_node_access(struct puffs_cc *pcc, void *opc, int mode,
int
p2k_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *vap,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
kauth_cred_t cred;
int rv;
@ -400,7 +398,7 @@ p2k_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *vap,
int
p2k_node_setattr(struct puffs_cc *pcc, void *opc, const struct vattr *vap,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
kauth_cred_t cred;
int rv;
@ -416,7 +414,7 @@ p2k_node_setattr(struct puffs_cc *pcc, void *opc, const struct vattr *vap,
int
p2k_node_fsync(struct puffs_cc *pcc, void *opc, const struct puffs_cred *pcr,
int flags, off_t offlo, off_t offhi, const struct puffs_cid *pcid)
int flags, off_t offlo, off_t offhi)
{
kauth_cred_t cred;
int rv;
@ -656,7 +654,7 @@ p2k_node_write(struct puffs_cc *pcc, void *opc, uint8_t *buf, off_t offset,
}
int
p2k_node_reclaim(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid)
p2k_node_reclaim(struct puffs_cc *pcc, void *opc)
{
rump_recyclenode(opc);
@ -666,7 +664,7 @@ p2k_node_reclaim(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid)
}
int
p2k_node_inactive(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid)
p2k_node_inactive(struct puffs_cc *pcc, void *opc)
{
struct vnode *vp = opc;
int rv;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fs.c,v 1.5 2007/07/17 10:06:03 pooka Exp $ */
/* $NetBSD: fs.c,v 1.6 2007/11/27 11:31:20 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: fs.c,v 1.5 2007/07/17 10:06:03 pooka Exp $");
__RCSID("$NetBSD: fs.c,v 1.6 2007/11/27 11:31:20 pooka Exp $");
#endif /* !lint */
#include <assert.h>
@ -227,8 +227,7 @@ p9p_handshake(struct puffs_usermount *pu,
}
int
puffs9p_fs_unmount(struct puffs_cc *pcc, int flags,
const struct puffs_cid *pcid)
puffs9p_fs_unmount(struct puffs_cc *pcc, int flags)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs9p *p9p = puffs_getspecific(pu);

View File

@ -1,4 +1,4 @@
/* $NetBSD: node.c,v 1.17 2007/10/13 17:21:39 pooka Exp $ */
/* $NetBSD: node.c,v 1.18 2007/11/27 11:31:20 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: node.c,v 1.17 2007/10/13 17:21:39 pooka Exp $");
__RCSID("$NetBSD: node.c,v 1.18 2007/11/27 11:31:20 pooka Exp $");
#endif /* !lint */
#include <assert.h>
@ -70,7 +70,7 @@ do_getattr(struct puffs_cc *pcc, struct puffs_node *pn, struct vattr *vap)
int
puffs9p_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *vap,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
int rv;
@ -209,8 +209,7 @@ puffs9p_node_readdir(struct puffs_cc *pcc, void *opc, struct dirent *dent,
int
puffs9p_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcr)
{
AUTOVAR(pcc);
struct puffs_node *pn = opc;
@ -243,7 +242,7 @@ puffs9p_node_setattr(struct puffs_cc *pcc, void *opc,
*/
int
puffs9p_node_open(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs9p *p9p = puffs_cc_getspecific(pcc);
struct puffs_node *pn = opc;
@ -275,8 +274,7 @@ puffs9p_node_open(struct puffs_cc *pcc, void *opc, int mode,
}
int
puffs9p_node_inactive(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
puffs9p_node_inactive(struct puffs_cc *pcc, void *opc)
{
struct puffs_node *pn = opc;
struct p9pnode *p9n = pn->pn_data;
@ -586,8 +584,7 @@ puffs9p_node_rename(struct puffs_cc *pcc, void *opc, void *src,
* - "thanks"
*/
int
puffs9p_node_reclaim(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
puffs9p_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct puffs_node *pn = opc;
struct p9pnode *p9n = pn->pn_data;

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_portal.c,v 1.14 2007/11/16 18:39:01 pooka Exp $ */
/* $NetBSD: puffs_portal.c,v 1.15 2007/11/27 11:31:21 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: puffs_portal.c,v 1.14 2007/11/16 18:39:01 pooka Exp $");
__RCSID("$NetBSD: puffs_portal.c,v 1.15 2007/11/27 11:31:21 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -516,7 +516,7 @@ int fakeid = 3;
/* XXX: libpuffs'ize */
int
portal_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct timeval tv;
struct timespec ts;
@ -548,7 +548,7 @@ portal_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
/* for writing, just pretend we care */
int
portal_node_setattr(struct puffs_cc *pcc, void *opc, const struct vattr *va,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
return 0;
@ -556,7 +556,7 @@ portal_node_setattr(struct puffs_cc *pcc, void *opc, const struct vattr *va,
int
portal_node_open(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct portal_node *portn = opc;
struct portal_cred portc;
@ -706,8 +706,7 @@ portal_node_seek(struct puffs_cc *pcc, void *opc, off_t oldoff, off_t newoff,
}
int
portal_node_poll(struct puffs_cc *pcc, void *opc, int *events,
const struct puffs_cid *pcid)
portal_node_poll(struct puffs_cc *pcc, void *opc, int *events)
{
struct portal_node *portn = opc;
int what;
@ -739,8 +738,7 @@ portal_node_poll(struct puffs_cc *pcc, void *opc, int *events,
}
int
portal_node_inactive(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
portal_node_inactive(struct puffs_cc *pcc, void *opc)
{
if (opc == PORTAL_ROOT)
@ -751,8 +749,7 @@ portal_node_inactive(struct puffs_cc *pcc, void *opc,
}
int
portal_node_reclaim(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
portal_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct portal_node *portn = opc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fs.c,v 1.13 2007/07/01 18:40:16 pooka Exp $ */
/* $NetBSD: fs.c,v 1.14 2007/11/27 11:31:21 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: fs.c,v 1.13 2007/07/01 18:40:16 pooka Exp $");
__RCSID("$NetBSD: fs.c,v 1.14 2007/11/27 11:31:21 pooka Exp $");
#endif /* !lint */
#include <err.h>
@ -129,7 +129,7 @@ psshfs_domount(struct puffs_usermount *pu)
}
int
psshfs_fs_unmount(struct puffs_cc *pcc, int flags, const struct puffs_cid *pcid)
psshfs_fs_unmount(struct puffs_cc *pcc, int flags)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct psshfs_ctx *pctx = puffs_getspecific(pu);

View File

@ -1,4 +1,4 @@
/* $NetBSD: node.c,v 1.45 2007/11/18 17:41:55 pooka Exp $ */
/* $NetBSD: node.c,v 1.46 2007/11/27 11:31:21 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: node.c,v 1.45 2007/11/18 17:41:55 pooka Exp $");
__RCSID("$NetBSD: node.c,v 1.46 2007/11/27 11:31:21 pooka Exp $");
#endif /* !lint */
#include <assert.h>
@ -106,7 +106,7 @@ psshfs_node_lookup(struct puffs_cc *pcc, void *opc, struct puffs_newinfo *pni,
int
psshfs_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *vap,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
int rv;
@ -122,8 +122,7 @@ psshfs_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *vap,
int
psshfs_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcr)
{
PSSHFSAUTOVAR(pcc);
struct vattr kludgeva;
@ -202,7 +201,7 @@ psshfs_node_create(struct puffs_cc *pcc, void *opc, struct puffs_newinfo *pni,
int
psshfs_node_mmap(struct puffs_cc* pcc, void *opc, vm_prot_t prot,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
struct psshfs_node *psn = pn->pn_data;
@ -217,7 +216,7 @@ psshfs_node_mmap(struct puffs_cc* pcc, void *opc, vm_prot_t prot,
int
psshfs_node_open(struct puffs_cc *pcc, void *opc, int mode,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
PSSHFSAUTOVAR(pcc);
struct vattr va;
@ -286,8 +285,7 @@ closehandles(struct puffs_cc *pcc, struct psshfs_node *psn)
}
int
psshfs_node_inactive(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
psshfs_node_inactive(struct puffs_cc *pcc, void *opc)
{
struct puffs_node *pn = opc;
struct psshfs_node *psn = pn->pn_data;
@ -704,8 +702,7 @@ psshfs_node_rename(struct puffs_cc *pcc, void *opc, void *src,
* bit.
*/
int
psshfs_node_reclaim(struct puffs_cc *pcc, void *opc,
const struct puffs_cid *pcid)
psshfs_node_reclaim(struct puffs_cc *pcc, void *opc)
{
struct puffs_usermount *pu = puffs_cc_getusermount(pcc);
struct puffs_node *pn = opc, *pn_next, *pn_root;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctlfs.c,v 1.6 2007/11/16 18:39:01 pooka Exp $ */
/* $NetBSD: sysctlfs.c,v 1.7 2007/11/27 11:31:21 pooka Exp $ */
/*
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: sysctlfs.c,v 1.6 2007/11/16 18:39:01 pooka Exp $");
__RCSID("$NetBSD: sysctlfs.c,v 1.7 2007/11/27 11:31:21 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -505,7 +505,7 @@ sysctlfs_node_lookup(struct puffs_cc *pcc, void *opc, struct puffs_newinfo *pni,
int
sysctlfs_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
const struct puffs_cred *pcr, const struct puffs_cid *pcid)
const struct puffs_cred *pcr)
{
struct puffs_node *pn = opc;
struct sfsnode *sfs = pn->pn_data;
@ -536,8 +536,7 @@ sysctlfs_node_getattr(struct puffs_cc *pcc, void *opc, struct vattr *va,
int
sysctlfs_node_setattr(struct puffs_cc *pcc, void *opc,
const struct vattr *va, const struct puffs_cred *pcr,
const struct puffs_cid *pcid)
const struct vattr *va, const struct puffs_cred *pcr)
{
/* dummy, but required for write */