Lines Matching refs:iocbp
698 static void iocb_init(struct thr_info *tip, struct iocb_pkt *iocbp) in iocb_init() argument
700 iocbp->tip = tip; in iocb_init()
701 iocbp->nbytes = 0; in iocb_init()
702 iocbp->iocb.u.c.buf = NULL; in iocb_init()
712 static void iocb_setup(struct iocb_pkt *iocbp, int rw, int n, long long off) in iocb_setup() argument
715 struct iocb *iop = &iocbp->iocb; in iocb_setup()
721 if (iocbp->nbytes) { in iocb_setup()
722 if (iocbp->nbytes >= n) { in iocb_setup()
732 iocbp->nbytes = n; in iocb_setup()
736 io_prep_pread(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup()
739 io_prep_pwrite(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup()
743 iop->data = iocbp; in iocb_setup()
779 struct iocb_pkt *iocbp = buf_alloc(sizeof(*iocbp)); in tip_init() local
781 iocb_init(tip, iocbp); in tip_init()
782 list_add_tail(&iocbp->head, &tip->free_iocbs); in tip_init()
838 struct iocb_pkt *iocbp = list_entry(p, struct iocb_pkt, head); in tip_release() local
840 list_del(&iocbp->head); in tip_release()
841 if (iocbp->nbytes) in tip_release()
842 free(iocbp->iocb.u.c.buf); in tip_release()
843 free(iocbp); in tip_release()
1055 struct iocb_pkt *iocbp = evp->data; in reclaim_ios() local
1057 if (evp->res != iocbp->iocb.u.c.nbytes) { in reclaim_ios()
1061 (long)iocbp->iocb.u.c.offset / nb_sec, in reclaim_ios()
1062 (long)iocbp->iocb.u.c.nbytes / nb_sec); in reclaim_ios()
1066 list_move_tail(&iocbp->head, &tip->free_iocbs); in reclaim_ios()
1223 struct iocb_pkt *iocbp; in iocbs_map() local
1235 iocbp = list_entry(tip->free_iocbs.next, struct iocb_pkt, head); in iocbs_map()
1236 iocb_setup(iocbp, rw, pkt->nbytes, pkt->sector * nb_sec); in iocbs_map()
1238 list_move_tail(&iocbp->head, &tip->used_iocbs); in iocbs_map()
1239 list[i] = &iocbp->iocb; in iocbs_map()