Lines Matching defs:retval
158 static void cluster_complete_transaction(buf_t *cbp_head, void *callback_arg, int *retval, int flags, int needwait);
878 cluster_complete_transaction(buf_t *cbp_head, void *callback_arg, int *retval, int flags, int needwait)
902 if ( !(flags & CL_ASYNC) && error && *retval == 0) {
904 *retval = error;
920 int retval = 0;
1223 cluster_complete_transaction(&cbp_head, callback_arg, &retval, flags, 0);
1390 cluster_complete_transaction(&cbp_head, callback_arg, &retval, flags, 0);
1573 cluster_complete_transaction(&cbp_head, callback_arg, &retval, flags, 1);
1647 if (retval == 0)
1648 retval = error;
1664 KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, 22)) | DBG_FUNC_END, (int)f_offset, size, upl_offset, retval, 0);
1666 return (retval);
1887 int retval;
1931 retval = cluster_io(vp, upl, upl_offset, f_offset, io_size,
1934 return (retval);
1980 int retval = 0;
2003 retval = cluster_write_copy(vp, NULL, (u_int32_t)0, oldEOF, newEOF, headOff, tailOff, flags, callback, callback_arg);
2005 return(retval);
2015 retval = cluster_io_type(uio, &write_type, &write_length, MIN_DIRECT_WRITE_SIZE);
2023 while ((cur_resid = uio_resid(uio)) && uio->uio_offset < newEOF && retval == 0) {
2054 retval = cluster_write_copy(vp, uio, write_length, oldEOF, newEOF, headOff, tailOff, zflags, callback, callback_arg);
2066 retval = cluster_write_copy(vp, (struct uio *)0, (u_int32_t)0, (off_t)0, uio->uio_offset,
2068 if (retval)
2071 retval = cluster_write_contig(vp, uio, newEOF, &write_type, &write_length, callback, callback_arg, bflag);
2073 if (retval == 0 && (flags & IO_TAILZEROFILL) && uio_resid(uio) == 0) {
2080 retval = cluster_write_copy(vp, (struct uio *)0, (u_int32_t)0, (off_t)0, tailOff, uio->uio_offset,
2089 retval = cluster_write_direct(vp, uio, oldEOF, newEOF, &write_type, &write_length, flags, callback, callback_arg);
2093 retval = cluster_io_type(uio, &write_type, &write_length, MIN_DIRECT_WRITE_SIZE);
2109 return (retval);
2133 int retval = 0;
2215 while (io_req_size >= PAGE_SIZE && uio->uio_offset < newEOF && retval == 0) {
2261 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
2402 retval = cluster_io(vp, upl, upl_offset, uio->uio_offset,
2419 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
2445 (int)upl_offset, (int)uio->uio_offset, io_req_size, retval, 0);
2449 if (retval == 0 && iostate.io_error == 0 && io_req_size == 0) {
2451 retval = cluster_io_type(uio, write_type, write_length, MIN_DIRECT_WRITE_SIZE);
2453 if (retval == 0 && *write_type == IO_DIRECT) {
2464 if (retval == 0 && iostate.io_error == 0 && useVectorUPL && vector_upl_index) {
2465 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
2477 retval = iostate.io_error;
2481 if (io_throttled == TRUE && retval == 0)
2482 retval = EAGAIN;
2484 if (io_req_size && retval == 0) {
2495 retval = cluster_write_copy(vp, uio, io_req_size, oldEOF, newEOF, (off_t)0, (off_t)0, flags, callback, callback_arg);
2500 (int)uio->uio_offset, io_req_size, retval, 4, 0);
2502 return (retval);
2757 int retval = 0;
2847 retval, 0, 0, 0, 0);
2860 while ((total_size = (io_resid + zero_cnt + zero_cnt1)) && retval == 0) {
2891 retval = cluster_copy_ubc_data_internal(vp, uio, &xfer_resid, 1, 1);
2893 if (retval)
2970 retval = cluster_io(vp, upl, 0, upl_f_offset, read_size,
2972 if (retval) {
2985 upl, 0, 0, retval, 0);
3006 retval = cluster_io(vp, upl, upl_offset, upl_f_offset + upl_offset, read_size,
3008 if (retval) {
3021 upl, 0, 0, retval, 0);
3049 retval = cluster_copy_upl_data(uio, upl, io_offset, (int *)&io_requested);
3051 if (retval) {
3055 upl, 0, 0, retval, 0);
3062 while (xfer_resid && zero_cnt1 && retval == 0) {
3076 if (retval == 0) {
3372 retval = cluster_push_now(vp, &cl, newEOF, flags, callback, callback_arg);
3375 KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, 40)) | DBG_FUNC_END, retval, 0, io_resid, 0, 0);
3377 return (retval);
3392 int retval = 0;
3413 retval = EINVAL;
3414 return retval;
3430 retval = cluster_io_type(uio, &read_type, &read_length, 0);
3433 while ((cur_resid = uio_resid(uio)) && uio->uio_offset < filesize && retval == 0) {
3448 retval = cluster_read_copy(vp, uio, io_size, filesize, flags, callback, callback_arg);
3452 retval = cluster_read_direct(vp, uio, filesize, &read_type, &read_length, flags, callback, callback_arg);
3456 retval = cluster_read_contig(vp, uio, filesize, &read_type, &read_length, callback, callback_arg, flags);
3460 retval = cluster_io_type(uio, &read_type, &read_length, 0);
3464 return (retval);
3502 int retval = 0;
3587 while (io_req_size && uio->uio_offset < filesize && retval == 0) {
3641 retval = cluster_copy_ubc_data_internal(vp, uio, (int *)&io_resid, 0, take_reference);
3648 if (retval || io_resid)
3664 if (retval)
3698 retval = EAGAIN;
3890 retval = cluster_copy_upl_data(uio, upl, start_offset, (int *)&io_requested);
3952 if (retval == 0)
3953 retval = error;
3988 * 'retval' already contains the early error
3997 (int)uio->uio_offset, io_req_size, rap->cl_lastr, retval, 0);
4002 (int)uio->uio_offset, io_req_size, 0, retval, 0);
4005 return (retval);
4024 int retval = 0;
4135 retval = EINVAL;
4143 while (io_req_size && retval == 0) {
4173 retval = cluster_copy_ubc_data_internal(vp, uio, (int *)&io_size, 0, 0);
4191 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
4264 if (retval || io_size < io_min) {
4433 retval = cluster_io(vp, upl, upl_offset, uio->uio_offset, io_size, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
4450 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
4477 upl, (int)uio->uio_offset, io_req_size, retval, 0);
4481 if (retval == 0 && iostate.io_error == 0 && io_req_size == 0 && uio->uio_offset < filesize) {
4483 retval = cluster_io_type(uio, read_type, read_length, 0);
4485 if (retval == 0 && *read_type == IO_DIRECT) {
4496 if(retval == 0 && iostate.io_error == 0 && useVectorUPL && vector_upl_index) {
4497 retval = vector_cluster_io(vp, vector_upl, vector_upl_offset, v_upl_uio_offset, vector_upl_iosize, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
4508 retval = iostate.io_error;
4512 if (io_throttled == TRUE && retval == 0)
4513 retval = EAGAIN;
4515 if (io_req_size && retval == 0) {
4520 retval = cluster_read_copy(vp, uio, io_req_size, filesize, flags, callback, callback_arg);
4525 (int)uio->uio_offset, (int)uio_resid(uio), io_req_size, retval, 0);
4527 return (retval);
4753 int retval = 0;
4784 retval = EFAULT;
4787 retval = EFAULT;
4804 KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, 94)) | DBG_FUNC_END, iov_base, *io_type, *io_length, retval, 0);
4806 return (retval);
4835 int retval = 0;
4862 while (resid && f_offset < filesize && retval == 0) {
4923 return(retval);
4981 retval = cluster_io(vp, upl, upl_offset, upl_f_offset + upl_offset, io_size,
4999 (int)f_offset, resid, retval, 0, 0);
5001 return(retval);
5015 int retval;
5095 retval = 1;
5097 retval = cluster_try_push(wbp, vp, ubc_getsize(vp), PUSH_ALL, flags | IO_PASSIVE, callback, callback_arg);
5118 wbp->cl_scmap, wbp->cl_number, retval, 0, 0);
5120 return (retval);
5350 int retval;
5489 retval = cluster_io(vp, upl, upl_offset, upl_f_offset + upl_offset, io_size,
5492 if (error == 0 && retval)
5493 error = retval;
5702 int retval = 0;
5741 while (xsize && retval == 0) {
5746 retval = uiomove64(paddr, csize, uio);
5758 (int)uio->uio_offset, xsize, retval, segflg, 0);
5760 return (retval);
5779 int retval = 0;
5791 (int)uio->uio_offset, io_size, retval, 3, 0);
5823 retval = memory_object_control_uiomove(control, uio->uio_offset - start_offset, uio,
5832 (int)uio->uio_offset, io_size, retval, 0x80000000 | segflg, 0);
5834 return(retval);