Lines Matching refs:reqp

81 	aio_req_t *reqp = (aio_req_t *)aio->aio_private;  in aphysio()  local
82 struct buf *bp = &reqp->aio_req_buf; in aphysio()
136 bp->b_forw = (struct buf *)reqp; in aphysio()
157 reqp->aio_req_flags |= AIO_PAGELOCKDONE; in aphysio()
167 reqp->aio_req_cancel = cancel; in aphysio()
196 aio_req_t *reqp; in aio_done() local
214 reqp = (aio_req_t *)bp->b_forw; in aio_done()
215 fd = reqp->aio_req_fd; in aio_done()
220 tnf_offset, blkno, btodt(reqp->aio_req_uio.uio_loffset), in aio_done()
221 tnf_size, size, reqp->aio_req_uio.uio_iov->iov_len, in aio_done()
240 ASSERT(reqp->aio_req_flags & AIO_PENDING); in aio_done()
242 reqp->aio_req_flags &= ~AIO_PENDING; in aio_done()
243 reqp_flags = reqp->aio_req_flags; in aio_done()
244 if ((pkevp = reqp->aio_req_portkev) != NULL) { in aio_done()
246 if (reqp->aio_req_flags & AIO_CLOSE_PORT) { in aio_done()
252 aio_deq(&aiop->aio_portpending, reqp); in aio_done()
253 aio_enq(&aiop->aio_portq, reqp, 0); in aio_done()
268 aio_deq(&aiop->aio_portpending, reqp); in aio_done()
269 aio_enq(&aiop->aio_portcleanupq, reqp, 0); in aio_done()
277 aio_deq(&aiop->aio_portpending, reqp); in aio_done()
278 aio_enq(&aiop->aio_portq, reqp, 0); in aio_done()
289 pollqflag = (reqp->aio_req_flags & AIO_POLL); in aio_done()
304 aio_enq(&aiop->aio_pollq, reqp, AIO_POLLQ); in aio_done()
305 else if (reqp->aio_req_sigqp || reqp->aio_req_lio) in aio_done()
306 aio_enq(&aiop->aio_notifyq, reqp, AIO_NOTIFYQ); in aio_done()
308 aio_enq(&aiop->aio_cleanupq, reqp, in aio_done()
346 sigev = reqp->aio_req_sigqp; in aio_done()
347 reqp->aio_req_sigqp = NULL; in aio_done()
350 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ); in aio_done()
357 if ((head = reqp->aio_req_lio) != NULL) { in aio_done()
395 (reqp->aio_req_flags & AIO_SOLARIS) && in aio_done()
399 reqp->aio_req_flags |= AIO_SIGNALLED; in aio_done()
453 aio_zerolen(aio_req_t *reqp) in aio_zerolen() argument
456 struct buf *bp = &reqp->aio_req_buf; in aio_zerolen()
458 reqp->aio_req_flags |= AIO_ZEROLEN; in aio_zerolen()
460 bp->b_forw = (struct buf *)reqp; in aio_zerolen()
473 aphysio_unlock(aio_req_t *reqp) in aphysio_unlock() argument
479 if (reqp->aio_req_flags & AIO_PHYSIODONE) in aphysio_unlock()
482 reqp->aio_req_flags |= AIO_PHYSIODONE; in aphysio_unlock()
484 if (reqp->aio_req_flags & AIO_ZEROLEN) in aphysio_unlock()
487 bp = &reqp->aio_req_buf; in aphysio_unlock()
488 iov = reqp->aio_req_uio.uio_iov; in aphysio_unlock()
490 if (reqp->aio_req_flags & AIO_PAGELOCKDONE) { in aphysio_unlock()
494 reqp->aio_req_flags &= ~AIO_PAGELOCKDONE; in aphysio_unlock()
504 aio_hash_delete(aio_t *aiop, struct aio_req_t *reqp) in aio_hash_delete() argument
507 aio_result_t *resultp = reqp->aio_req_resultp; in aio_hash_delete()
540 aio_req_free(aio_t *aiop, aio_req_t *reqp) in aio_req_free() argument
546 if (reqp->aio_req_portkev) { in aio_req_free()
547 port_free_event(reqp->aio_req_portkev); in aio_req_free()
548 reqp->aio_req_portkev = NULL; in aio_req_free()
551 if ((liop = reqp->aio_req_lio) != NULL) { in aio_req_free()
554 reqp->aio_req_lio = NULL; in aio_req_free()
556 if (reqp->aio_req_sigqp != NULL) { in aio_req_free()
557 kmem_free(reqp->aio_req_sigqp, sizeof (sigqueue_t)); in aio_req_free()
558 reqp->aio_req_sigqp = NULL; in aio_req_free()
560 reqp->aio_req_next = aiop->aio_free; in aio_req_free()
561 reqp->aio_req_prev = NULL; in aio_req_free()
562 aiop->aio_free = reqp; in aio_req_free()
566 aio_hash_delete(aiop, reqp); in aio_req_free()
573 aio_req_free_port(aio_t *aiop, aio_req_t *reqp) in aio_req_free_port() argument
577 reqp->aio_req_next = aiop->aio_free; in aio_req_free_port()
578 reqp->aio_req_prev = NULL; in aio_req_free_port()
579 aiop->aio_free = reqp; in aio_req_free_port()
581 aio_hash_delete(aiop, reqp); in aio_req_free_port()
593 aio_req_t *reqp; in aio_verify_queue() local
597 if ((reqp = head) != NULL) { in aio_verify_queue()
599 ASSERT(reqp->aio_req_prev->aio_req_next == reqp); in aio_verify_queue()
600 ASSERT(reqp->aio_req_next->aio_req_prev == reqp); in aio_verify_queue()
601 if (entry_present == reqp) in aio_verify_queue()
603 if (entry_missing == reqp) in aio_verify_queue()
605 } while ((reqp = reqp->aio_req_next) != head); in aio_verify_queue()
618 aio_enq(aio_req_t **qhead, aio_req_t *reqp, int qflg_new) in aio_enq() argument
623 aio_verify_queue(*qhead, NULL, reqp); in aio_enq()
626 reqp->aio_req_next = reqp; in aio_enq()
627 reqp->aio_req_prev = reqp; in aio_enq()
628 *qhead = reqp; in aio_enq()
630 reqp->aio_req_next = head; in aio_enq()
631 reqp->aio_req_prev = prev = head->aio_req_prev; in aio_enq()
632 prev->aio_req_next = reqp; in aio_enq()
633 head->aio_req_prev = reqp; in aio_enq()
635 reqp->aio_req_flags |= qflg_new; in aio_enq()
642 aio_deq(aio_req_t **qhead, aio_req_t *reqp) in aio_deq() argument
644 aio_verify_queue(*qhead, reqp, NULL); in aio_deq()
646 if (reqp->aio_req_next == reqp) { in aio_deq()
649 reqp->aio_req_prev->aio_req_next = reqp->aio_req_next; in aio_deq()
650 reqp->aio_req_next->aio_req_prev = reqp->aio_req_prev; in aio_deq()
651 if (*qhead == reqp) in aio_deq()
652 *qhead = reqp->aio_req_next; in aio_deq()
654 reqp->aio_req_next = NULL; in aio_deq()
655 reqp->aio_req_prev = NULL; in aio_deq()
668 aio_req_t *reqp = q2; in aio_cleanupq_concat() local
671 ASSERT(reqp->aio_req_flags & qflg); in aio_cleanupq_concat()
672 reqp->aio_req_flags &= ~qflg; in aio_cleanupq_concat()
673 reqp->aio_req_flags |= AIO_CLEANUPQ; in aio_cleanupq_concat()
674 } while ((reqp = reqp->aio_req_next) != q2); in aio_cleanupq_concat()
805 aio_req_t *reqp; in aio_cleanup_portq() local
828 if ((reqp = headp) != NULL) { in aio_cleanup_portq()
830 next = reqp->aio_req_next; in aio_cleanup_portq()
831 aphysio_unlock(reqp); in aio_cleanup_portq()
834 aio_req_free(aiop, reqp); in aio_cleanup_portq()
837 } while ((reqp = next) != headp); in aio_cleanup_portq()
861 if ((reqp = cleanupq) == NULL) in aio_cleanup_portq()
864 next = reqp->aio_req_next; in aio_cleanup_portq()
865 aphysio_unlock(reqp); in aio_cleanup_portq()
868 aio_req_free(aiop, reqp); in aio_cleanup_portq()
872 aio_enq(&aiop->aio_portq, reqp, 0); in aio_cleanup_portq()
874 port_send_event(reqp->aio_req_portkev); in aio_cleanup_portq()
875 if ((liop = reqp->aio_req_lio) != NULL) { in aio_cleanup_portq()
892 } while ((reqp = next) != cleanupq); in aio_cleanup_portq()
901 aio_req_t *reqp, *next; in aio_cleanup_cleanupq() local
913 if ((reqp = qhead) == NULL) in aio_cleanup_cleanupq()
916 ASSERT(reqp->aio_req_flags & AIO_CLEANUPQ); in aio_cleanup_cleanupq()
917 ASSERT(reqp->aio_req_portkev == NULL); in aio_cleanup_cleanupq()
918 next = reqp->aio_req_next; in aio_cleanup_cleanupq()
919 aphysio_unlock(reqp); in aio_cleanup_cleanupq()
922 aio_req_free(aiop, reqp); in aio_cleanup_cleanupq()
924 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ); in aio_cleanup_cleanupq()
926 if (reqp->aio_req_flags & AIO_SIGNALLED) in aio_cleanup_cleanupq()
929 reqp->aio_req_flags |= AIO_SIGNALLED; in aio_cleanup_cleanupq()
932 } while ((reqp = next) != qhead); in aio_cleanup_cleanupq()
942 aio_req_t *reqp, *next; in aio_cleanup_notifyq() local
947 if ((reqp = qhead) == NULL) in aio_cleanup_notifyq()
950 ASSERT(reqp->aio_req_flags & AIO_NOTIFYQ); in aio_cleanup_notifyq()
951 next = reqp->aio_req_next; in aio_cleanup_notifyq()
952 aphysio_unlock(reqp); in aio_cleanup_notifyq()
955 aio_req_free(aiop, reqp); in aio_cleanup_notifyq()
959 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ); in aio_cleanup_notifyq()
960 sigev = reqp->aio_req_sigqp; in aio_cleanup_notifyq()
961 reqp->aio_req_sigqp = NULL; in aio_cleanup_notifyq()
962 if ((liohead = reqp->aio_req_lio) != NULL) { in aio_cleanup_notifyq()
973 aio_sigev_send(reqp->aio_req_buf.b_proc, in aio_cleanup_notifyq()
978 aio_sigev_send(reqp->aio_req_buf.b_proc, in aio_cleanup_notifyq()
982 } while ((reqp = next) != qhead); in aio_cleanup_notifyq()
993 aio_req_t *reqp, *next; in aio_cleanup_pollq() local
999 if ((reqp = qhead) == NULL) in aio_cleanup_pollq()
1002 ASSERT(reqp->aio_req_flags & AIO_POLLQ); in aio_cleanup_pollq()
1003 next = reqp->aio_req_next; in aio_cleanup_pollq()
1004 aphysio_unlock(reqp); in aio_cleanup_pollq()
1007 aio_req_free(aiop, reqp); in aio_cleanup_pollq()
1010 aio_copyout_result(reqp); in aio_cleanup_pollq()
1012 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ); in aio_cleanup_pollq()
1015 } while ((reqp = next) != qhead); in aio_cleanup_pollq()
1027 aio_req_t *reqp, *next, *head; in aio_cleanup_exit() local
1056 reqp = head; in aio_cleanup_exit()
1058 next = reqp->aio_req_next; in aio_cleanup_exit()
1059 aphysio_unlock(reqp); in aio_cleanup_exit()
1060 kmem_free(reqp, sizeof (struct aio_req_t)); in aio_cleanup_exit()
1061 } while ((reqp = next) != head); in aio_cleanup_exit()
1066 for (reqp = aiop->aio_free; reqp != NULL; reqp = next) { in aio_cleanup_exit()
1067 next = reqp->aio_req_next; in aio_cleanup_exit()
1068 kmem_free(reqp, sizeof (struct aio_req_t)); in aio_cleanup_exit()
1094 aio_copyout_result(aio_req_t *reqp) in aio_copyout_result() argument
1102 if (reqp->aio_req_flags & AIO_COPYOUTDONE) in aio_copyout_result()
1105 reqp->aio_req_flags |= AIO_COPYOUTDONE; in aio_copyout_result()
1107 iov = reqp->aio_req_uio.uio_iov; in aio_copyout_result()
1108 bp = &reqp->aio_req_buf; in aio_copyout_result()
1110 resultp = (void *)reqp->aio_req_resultp; in aio_copyout_result()
1173 aio_req_remove_portq(aio_t *aiop, aio_req_t *reqp) in aio_req_remove_portq() argument
1187 aio_deq(&aiop->aio_portq, reqp); in aio_req_remove_portq()
1195 aio_req_t *reqp; in aio_close_port() local
1228 reqp = headp; in aio_close_port()
1230 if (reqp->aio_req_portkev && in aio_close_port()
1231 reqp->aio_req_port == port) { in aio_close_port()
1232 reqp->aio_req_flags |= AIO_CLOSE_PORT; in aio_close_port()
1235 } while ((reqp = reqp->aio_req_next) != headp); in aio_close_port()
1253 if ((reqp = aiop->aio_portq) != NULL) { in aio_close_port()
1255 next = reqp->aio_req_next; in aio_close_port()
1256 if (reqp->aio_req_port == port) { in aio_close_port()
1258 aio_req_remove_portq(aiop, reqp); in aio_close_port()
1259 port_free_event(reqp->aio_req_portkev); in aio_close_port()
1261 reqp->aio_req_next = headp; in aio_close_port()
1262 headp = reqp; in aio_close_port()
1264 } while ((reqp = next) != aiop->aio_portq); in aio_close_port()
1269 for (reqp = headp; reqp != NULL; reqp = next) { in aio_close_port()
1270 next = reqp->aio_req_next; in aio_close_port()
1271 aphysio_unlock(reqp); in aio_close_port()
1273 aio_req_free_port(aiop, reqp); in aio_close_port()