• Home
  • Raw
  • Download

Lines Matching refs:iocbp

716 static void iocb_init(struct thr_info *tip, struct iocb_pkt *iocbp)  in iocb_init()  argument
718 iocbp->tip = tip; in iocb_init()
719 iocbp->nbytes = 0; in iocb_init()
720 iocbp->iocb.u.c.buf = NULL; in iocb_init()
730 static void iocb_setup(struct iocb_pkt *iocbp, int rw, int n, long long off) in iocb_setup() argument
733 struct iocb *iop = &iocbp->iocb; in iocb_setup()
739 if (iocbp->nbytes) { in iocb_setup()
740 if (iocbp->nbytes >= n) { in iocb_setup()
750 iocbp->nbytes = n; in iocb_setup()
754 io_prep_pread(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup()
757 io_prep_pwrite(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup()
761 iop->data = iocbp; in iocb_setup()
797 struct iocb_pkt *iocbp = buf_alloc(sizeof(*iocbp)); in tip_init() local
799 iocb_init(tip, iocbp); in tip_init()
800 list_add_tail(&iocbp->head, &tip->free_iocbs); in tip_init()
856 struct iocb_pkt *iocbp = list_entry(p, struct iocb_pkt, head); in tip_release() local
858 list_del(&iocbp->head); in tip_release()
859 if (iocbp->nbytes) in tip_release()
860 free(iocbp->iocb.u.c.buf); in tip_release()
861 free(iocbp); in tip_release()
1073 struct iocb_pkt *iocbp = evp->data; in reclaim_ios() local
1075 if (evp->res != iocbp->iocb.u.c.nbytes) { in reclaim_ios()
1079 (long)iocbp->iocb.u.c.offset / nb_sec, in reclaim_ios()
1080 (long)iocbp->iocb.u.c.nbytes / nb_sec); in reclaim_ios()
1084 list_move_tail(&iocbp->head, &tip->free_iocbs); in reclaim_ios()
1241 struct iocb_pkt *iocbp; in iocbs_map() local
1253 iocbp = list_entry(tip->free_iocbs.next, struct iocb_pkt, head); in iocbs_map()
1254 iocb_setup(iocbp, rw, pkt->nbytes, pkt->sector * nb_sec); in iocbs_map()
1256 list_move_tail(&iocbp->head, &tip->used_iocbs); in iocbs_map()
1257 list[i] = &iocbp->iocb; in iocbs_map()