Lines Matching defs:uio

45 #include <sys/uio.h>
455 mappedread(vnode_t *vp, int nbytes, uio_t *uio)
462 start = uio->uio_loffset;
472 error = uiomove(va + off, bytes, UIO_READ, uio);
477 uio, bytes);
493 * uio - structure supplying read location, range info,
499 * OUT: uio - updated offset and range, buffer filled.
508 zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
528 if (uio->uio_loffset < (offset_t)0) {
536 if (uio->uio_resid == 0) {
546 uio->uio_loffset, uio->uio_resid, uio->uio_fmode, ct)) {
561 rl = zfs_range_lock(zp, uio->uio_loffset, uio->uio_resid, RL_READER);
567 if (uio->uio_loffset >= zp->z_size) {
572 ASSERT(uio->uio_loffset < zp->z_size);
573 n = MIN(uio->uio_resid, zp->z_size - uio->uio_loffset);
575 if ((uio->uio_extflg == UIO_XUIO) &&
576 (((xuio_t *)uio)->xu_type == UIOTYPE_ZEROCOPY)) {
579 uint64_t offset = uio->uio_loffset;
581 xuio = (xuio_t *)uio;
606 P2PHASE(uio->uio_loffset, zfs_read_chunk_size));
609 error = mappedread(vp, nbytes, uio);
612 uio, nbytes);
635 * uio - structure supplying write location, range info,
642 * OUT: uio - updated offset and range.
652 zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
655 rlim64_t limit = uio->uio_llimit;
656 ssize_t start_resid = uio->uio_resid;
671 int iovcnt = uio->uio_iovcnt;
672 iovec_t *iovp = uio->uio_iov;
713 (uio->uio_loffset < zp->z_size))) {
723 woff = ioflag & FAPPEND ? zp->z_size : uio->uio_loffset;
734 (error = chklock(vp, FWRITE, woff, n, uio->uio_fmode, ct)) != 0) {
742 * Skip this if uio contains loaned arc_buf.
744 if ((uio->uio_extflg == UIO_XUIO) &&
745 (((xuio_t *)uio)->xu_type == UIOTYPE_ZEROCOPY))
746 xuio = (xuio_t *)uio;
748 uio_prefaultpages(MIN(n, max_blksz), uio);
768 uio->uio_loffset = woff;
799 woff = uio->uio_loffset;
837 UIO_WRITE, uio, &cbytes)) {
891 tx_bytes = uio->uio_resid;
893 uio, nbytes, tx);
894 tx_bytes -= uio->uio_resid;
916 ASSERT(tx_bytes <= uio->uio_resid);
917 uioskip(uio, tx_bytes);
968 while ((end_size = zp->z_size) < uio->uio_loffset) {
970 uio->uio_loffset);
992 uio_prefaultpages(MIN(n, max_blksz), uio);
1001 if (zfsvfs->z_replay || uio->uio_resid == start_resid) {
2162 * the uio structure).
2165 * uio - structure supplying read location, range info,
2171 * OUT: uio - updated offset and range, buffer filled.
2186 zfs_readdir(vnode_t *vp, uio_t *uio, cred_t *cr, int *eofp,
2227 if (uio->uio_iov->iov_len <= 0) {
2242 offset = uio->uio_loffset;
2263 iovp = uio->uio_iov;
2265 if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1) {
2425 if (uio->uio_segflg == UIO_SYSSPACE && uio->uio_iovcnt == 1) {
2428 uio->uio_resid -= outcount;
2429 } else if (error = uiomove(outbuf, (long)outcount, UIO_READ, uio)) {
2433 offset = uio->uio_loffset;
2438 if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
2446 uio->uio_loffset = offset;
3944 * Return, in the buffer contained in the provided uio structure,
3948 * uio - structure to contain the link path.
3952 * OUT: uio - structure containing the link path.
3961 zfs_readlink(vnode_t *vp, uio_t *uio, cred_t *cr, caller_context_t *ct)
3973 SA_ZPL_SYMLINK(zfsvfs), uio);
3975 error = zfs_sa_readlink(zp, uio);
5060 uio_t *uio = &xuio->xu_uio;
5061 ssize_t size = uio->uio_resid;
5062 offset_t offset = uio->uio_loffset;
5154 maxsize = zp->z_size - uio->uio_loffset;
5168 uio->uio_extflg = UIO_XUIO;