Home | History | Annotate | Download | only in btreplay

Lines Matching refs:bunch

1112  * next_bunch - Retrieve next bunch of AIOs to process
1114 * @bunch: Bunch information
1116 * Returns TRUE if we recovered a bunch of IOs, else hit EOF
1118 static int next_bunch(struct thr_info *tip, struct io_bunch *bunch)
1122 result = read(tip->ifd, &bunch->hdr, sizeof(bunch->hdr));
1123 if (result != sizeof(bunch->hdr)) {
1131 assert(bunch->hdr.npkts <= BT_MAX_PKTS);
1133 count = bunch->hdr.npkts * sizeof(struct io_pkt);
1134 result = read(tip->ifd, &bunch->pkts, count);
1248 * process_bunch - Process a bunch of requests
1250 * @bunch: Bunch to process
1252 static void process_bunch(struct thr_info *tip, struct io_bunch *bunch)
1255 struct iocb *list[bunch->hdr.npkts];
1257 assert(0 < bunch->hdr.npkts && bunch->hdr.npkts <= BT_MAX_PKTS);
1258 while (!is_send_done(tip) && (i < bunch->hdr.npkts)) {
1260 int ntodo = min(nfree_current(tip), bunch->hdr.npkts - i);
1263 iocbs_map(tip, list, &bunch->pkts[i], ntodo);
1265 stall(tip, bunch->hdr.time_stamp - genesis);
1289 assert(i <= bunch->hdr.npkts);
1298 * We also do a dummy read of the file header to get us to the first bunch.
1318 struct io_bunch bunch;
1342 while (!is_send_done(tip) && next_bunch(tip, &bunch))
1343 process_bunch(tip, &bunch);