version 1.44, 2007/10/04 21:20:47 |
version 1.45, 2007/10/09 15:49:34 |
Line 209 puffs_reqtofaf(struct puffs_park *park) |
|
Line 209 puffs_reqtofaf(struct puffs_park *park) |
|
* kernel-user-kernel waitqueues |
* kernel-user-kernel waitqueues |
*/ |
*/ |
|
|
static int touser(struct puffs_mount *, struct puffs_park *, uint64_t); |
static int touser(struct puffs_mount *, struct puffs_park *); |
|
|
uint64_t |
uint64_t |
puffs_getreqid(struct puffs_mount *pmp) |
puffs_getreqid(struct puffs_mount *pmp) |
Line 238 puffs_vfstouser(struct puffs_mount *pmp, |
|
Line 238 puffs_vfstouser(struct puffs_mount *pmp, |
|
park->park_maxlen = park->park_copylen = buflen; |
park->park_maxlen = park->park_copylen = buflen; |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
return touser(pmp, park, puffs_getreqid(pmp)); |
return touser(pmp, park); |
} |
} |
|
|
void |
void |
Line 261 puffs_suspendtouser(struct puffs_mount * |
|
Line 261 puffs_suspendtouser(struct puffs_mount * |
|
= sizeof(struct puffs_vfsreq_suspend); |
= sizeof(struct puffs_vfsreq_suspend); |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
(void)touser(pmp, park, 0); |
(void)touser(pmp, park); |
} |
} |
|
|
/* |
/* |
Line 289 puffs_vntouser(struct puffs_mount *pmp, |
|
Line 289 puffs_vntouser(struct puffs_mount *pmp, |
|
park->park_maxlen = buflen + maxdelta; |
park->park_maxlen = buflen + maxdelta; |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
rv = touser(pmp, park, puffs_getreqid(pmp)); |
rv = touser(pmp, park); |
|
|
/* |
/* |
* Check if the user server requests that inactive be called |
* Check if the user server requests that inactive be called |
Line 338 puffs_cookietouser(struct puffs_mount *p |
|
Line 338 puffs_cookietouser(struct puffs_mount *p |
|
park->park_copylen = park->park_maxlen = buflen; |
park->park_copylen = park->park_maxlen = buflen; |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
return touser(pmp, park, puffs_getreqid(pmp)); |
return touser(pmp, park); |
} |
|
|
|
/* |
|
* vnode level request, caller-controller req id |
|
*/ |
|
int |
|
puffs_vntouser_req(struct puffs_mount *pmp, int optype, |
|
void *kbuf, size_t buflen, size_t maxdelta, |
|
uint64_t reqid, struct vnode *vp_opc, struct vnode *vp_aux) |
|
{ |
|
struct puffs_park *park; |
|
void *cookie = VPTOPNC(vp_opc); |
|
|
|
park = puffs_park_alloc(1); |
|
park->park_preq = kbuf; |
|
|
|
park->park_preq->preq_opclass = PUFFSOP_VN; |
|
park->park_preq->preq_optype = optype; |
|
park->park_preq->preq_cookie = cookie; |
|
|
|
park->park_copylen = buflen; |
|
park->park_maxlen = buflen + maxdelta; |
|
park->park_flags = 0; |
|
|
|
return touser(pmp, park, reqid); |
|
} |
} |
|
|
void |
void |
Line 388 puffs_vntouser_call(struct puffs_mount * |
|
Line 363 puffs_vntouser_call(struct puffs_mount * |
|
park->park_donearg = donearg; |
park->park_donearg = donearg; |
park->park_flags = PARKFLAG_CALL; |
park->park_flags = PARKFLAG_CALL; |
|
|
(void) touser(pmp, park, puffs_getreqid(pmp)); |
(void) touser(pmp, park); |
} |
} |
|
|
/* |
/* |
Line 417 puffs_vntouser_faf(struct puffs_mount *p |
|
Line 392 puffs_vntouser_faf(struct puffs_mount *p |
|
park->park_maxlen = park->park_copylen = buflen; |
park->park_maxlen = park->park_copylen = buflen; |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
(void)touser(pmp, park, 0); |
(void)touser(pmp, park); |
} |
} |
|
|
void |
void |
Line 433 puffs_cacheop(struct puffs_mount *pmp, s |
|
Line 408 puffs_cacheop(struct puffs_mount *pmp, s |
|
park->park_maxlen = park->park_copylen = pcilen; |
park->park_maxlen = park->park_copylen = pcilen; |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
(void)touser(pmp, park, 0); |
(void)touser(pmp, park); |
} |
} |
|
|
void |
void |
Line 458 puffs_errnotify(struct puffs_mount *pmp, |
|
Line 433 puffs_errnotify(struct puffs_mount *pmp, |
|
park->park_maxlen = park->park_copylen = sizeof(struct puffs_error); |
park->park_maxlen = park->park_copylen = sizeof(struct puffs_error); |
park->park_flags = 0; |
park->park_flags = 0; |
|
|
(void)touser(pmp, park, 0); |
(void)touser(pmp, park); |
} |
} |
|
|
/* |
/* |
Line 472 puffs_errnotify(struct puffs_mount *pmp, |
|
Line 447 puffs_errnotify(struct puffs_mount *pmp, |
|
* there's a slight ugly-factor also, but let's not worry about that. |
* there's a slight ugly-factor also, but let's not worry about that. |
*/ |
*/ |
static int |
static int |
touser(struct puffs_mount *pmp, struct puffs_park *park, uint64_t reqid) |
touser(struct puffs_mount *pmp, struct puffs_park *park) |
{ |
{ |
struct lwp *l = curlwp; |
struct lwp *l = curlwp; |
struct mount *mp; |
struct mount *mp; |
Line 481 touser(struct puffs_mount *pmp, struct p |
|
Line 456 touser(struct puffs_mount *pmp, struct p |
|
|
|
mp = PMPTOMP(pmp); |
mp = PMPTOMP(pmp); |
preq = park->park_preq; |
preq = park->park_preq; |
preq->preq_id = park->park_id = reqid; |
|
preq->preq_buflen = ALIGN(park->park_maxlen); |
preq->preq_buflen = ALIGN(park->park_maxlen); |
|
KASSERT(preq->preq_id == 0); |
if (PUFFSOP_WANTREPLY(preq->preq_opclass)) |
if (PUFFSOP_WANTREPLY(preq->preq_opclass)) { |
park->park_flags |= PARKFLAG_WANTREPLY; |
park->park_flags |= PARKFLAG_WANTREPLY; |
|
preq->preq_id = park->park_id = puffs_getreqid(pmp); |
|
} |
|
|
/* |
/* |
* To support PCATCH, yet another movie: check if there are signals |
* To support PCATCH, yet another movie: check if there are signals |