version 1.57, 2007/10/11 19:41:14 |
version 1.57.4.1, 2007/11/19 00:48:29 |
Line 110 puffs_parkdone_asyncbioread(struct puffs |
|
Line 110 puffs_parkdone_asyncbioread(struct puffs |
|
struct buf *bp = arg; |
struct buf *bp = arg; |
size_t moved; |
size_t moved; |
|
|
|
DPRINTF(("%s\n", __func__)); |
|
|
bp->b_error = checkerr(pmp, preq->preq_rv, __func__); |
bp->b_error = checkerr(pmp, preq->preq_rv, __func__); |
if (bp->b_error == 0) { |
if (bp->b_error == 0) { |
moved = bp->b_bcount - read_msg->pvnr_resid; |
if (read_msg->pvnr_resid > bp->b_bcount) { |
bp->b_resid = read_msg->pvnr_resid; |
puffs_senderr(pmp, PUFFS_ERR_READ, E2BIG, |
|
"resid grew", preq->preq_cookie); |
|
bp->b_error = E2BIG; |
|
} else { |
|
moved = bp->b_bcount - read_msg->pvnr_resid; |
|
bp->b_resid = read_msg->pvnr_resid; |
|
|
|
memcpy(bp->b_data, read_msg->pvnr_data, moved); |
|
} |
|
} |
|
|
|
biodone(bp); |
|
} |
|
|
|
void |
|
puffs_parkdone_asyncbiowrite(struct puffs_mount *pmp, |
|
struct puffs_req *preq, void *arg) |
|
{ |
|
struct puffs_vnmsg_write *write_msg = (void *)preq; |
|
struct buf *bp = arg; |
|
|
memcpy(bp->b_data, read_msg->pvnr_data, moved); |
DPRINTF(("%s\n", __func__)); |
|
|
|
bp->b_error = checkerr(pmp, preq->preq_rv, __func__); |
|
if (bp->b_error == 0) { |
|
if (write_msg->pvnr_resid > bp->b_bcount) { |
|
puffs_senderr(pmp, PUFFS_ERR_WRITE, E2BIG, |
|
"resid grew", preq->preq_cookie); |
|
bp->b_error = E2BIG; |
|
} else { |
|
bp->b_resid = write_msg->pvnr_resid; |
|
} |
} |
} |
|
|
biodone(bp); |
biodone(bp); |
Line 179 puffs_gop_markupdate(struct vnode *vp, i |
|
Line 210 puffs_gop_markupdate(struct vnode *vp, i |
|
if (flags & GOP_UPDATE_MODIFIED) |
if (flags & GOP_UPDATE_MODIFIED) |
uflags |= PUFFS_UPDATEMTIME; |
uflags |= PUFFS_UPDATEMTIME; |
|
|
puffs_updatenode(vp, uflags); |
puffs_updatenode(VPTOPP(vp), uflags, 0); |
|
} |
|
|
|
void |
|
puffs_senderr(struct puffs_mount *pmp, int type, int error, |
|
const char *str, void *cookie) |
|
{ |
|
struct puffs_msgpark *park; |
|
struct puffs_error *perr; |
|
|
|
puffs_msgmem_alloc(sizeof(struct puffs_error), &park, (void**)&perr, 1); |
|
puffs_msg_setfaf(park); |
|
puffs_msg_setinfo(park, PUFFSOP_ERROR, type, cookie); |
|
|
|
perr->perr_error = error; |
|
strlcpy(perr->perr_str, str, sizeof(perr->perr_str)); |
|
|
|
puffs_msg_enqueue(pmp, park); |
|
puffs_msgmem_release(park); |
} |
} |