Lines Matching refs:uiop
182 smbfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) in smbfs_readvnode() argument
194 if (uiop->uio_segflg == UIO_NOCOPY) in smbfs_readvnode()
201 if (uiop->uio_resid == 0) in smbfs_readvnode()
203 if (uiop->uio_offset < 0) in smbfs_readvnode()
207 td = uiop->uio_td; in smbfs_readvnode()
212 error = smbfs_readvdir(vp, uiop, cred); in smbfs_readvnode()
238 error = smb_read(smp->sm_share, np->n_fid, uiop, scred); in smbfs_readvnode()
244 smbfs_writevnode(struct vnode *vp, struct uio *uiop, in smbfs_writevnode() argument
257 SMBVDEBUG("ofs=%jd,resid=%zd\n", (intmax_t)uiop->uio_offset, in smbfs_writevnode()
258 uiop->uio_resid); in smbfs_writevnode()
259 if (uiop->uio_offset < 0) in smbfs_writevnode()
263 td = uiop->uio_td; in smbfs_writevnode()
280 uiop->uio_offset = np->n_size; in smbfs_writevnode()
283 if (uiop->uio_resid == 0) in smbfs_writevnode()
286 error = vn_rlimit_fsize(vp, uiop, td); in smbfs_writevnode()
292 error = smb_write(smp->sm_share, np->n_fid, uiop, scred); in smbfs_writevnode()
294 SMBVDEBUG("after: ofs=%jd,resid=%zd\n", (intmax_t)uiop->uio_offset, in smbfs_writevnode()
295 uiop->uio_resid); in smbfs_writevnode()
297 if (uiop->uio_offset > np->n_size) { in smbfs_writevnode()
298 np->n_size = uiop->uio_offset; in smbfs_writevnode()
313 struct uio *uiop; in smbfs_doio() local
318 uiop = malloc(sizeof(struct uio), M_SMBFSDATA, M_WAITOK); in smbfs_doio()
319 uiop->uio_iov = &io; in smbfs_doio()
320 uiop->uio_iovcnt = 1; in smbfs_doio()
321 uiop->uio_segflg = UIO_SYSSPACE; in smbfs_doio()
322 uiop->uio_td = td; in smbfs_doio()
328 io.iov_len = uiop->uio_resid = bp->b_bcount; in smbfs_doio()
330 uiop->uio_rw = UIO_READ; in smbfs_doio()
333 uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE; in smbfs_doio()
334 error = smb_read(smp->sm_share, np->n_fid, uiop, scred); in smbfs_doio()
337 if (uiop->uio_resid) { in smbfs_doio()
338 int left = uiop->uio_resid; in smbfs_doio()
357 io.iov_len = uiop->uio_resid = bp->b_dirtyend - bp->b_dirtyoff; in smbfs_doio()
358 uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff; in smbfs_doio()
360 uiop->uio_rw = UIO_WRITE; in smbfs_doio()
361 error = smb_write(smp->sm_share, np->n_fid, uiop, scred); in smbfs_doio()
397 free(uiop, M_SMBFSDATA); in smbfs_doio()
402 bp->b_resid = uiop->uio_resid; in smbfs_doio()
404 free(uiop, M_SMBFSDATA); in smbfs_doio()