Lines Matching refs:wp
110 static struct worker *wp; variable
154 wp = &workers[0]; in alloctape()
155 wp->count = 1; in alloctape()
156 wp->tapea = 0; in alloctape()
157 wp->firstrec = 0; in alloctape()
158 nextblock = wp->tblock; in alloctape()
166 wp->req[trecno].dblk = (ufs2_daddr_t)0; in writerec()
167 wp->req[trecno].count = 1; in writerec()
187 wp->req[trecno].dblk = dblkno; in dumpblock()
188 wp->req[trecno].count = avail; in dumpblock()
234 int siz = (char *)nextblock - (char *)wp->req; in flushtape()
236 wp->req[trecno].count = 0; /* Sentinel */ in flushtape()
238 if (atomic_write(wp->fd, (const void *)wp->req, siz) != siz) in flushtape()
240 wp->sent = 1; /* we sent a request, read the response later */ in flushtape()
242 lastfirstrec = wp->firstrec; in flushtape()
244 if (++wp >= &workers[WORKERS]) in flushtape()
245 wp = &workers[0]; in flushtape()
248 if (wp->sent) { in flushtape()
249 if (atomic_read(wp->fd, (void *)&got, sizeof got) in flushtape()
254 wp->sent = 0; in flushtape()
290 wp->count = lastspclrec + blks + 1 - spcl.c_tapea; in flushtape()
291 wp->tapea = spcl.c_tapea; in flushtape()
292 wp->firstrec = lastfirstrec + ntrec; in flushtape()
293 wp->inode = curino; in flushtape()
294 nextblock = wp->tblock; in flushtape()
413 otb = (union u_spcl *)wp->tblock; in rollforward()
420 for (p = wp->req; p->count > 0; p += p->count) { in rollforward()
442 spcl.c_tapea = wp->tapea; in rollforward()
448 if (atomic_write(wp->fd, (const void *)q, size) != size) { in rollforward()
452 wp->sent = 1; in rollforward()
453 if (++wp >= &workers[WORKERS]) in rollforward()
454 wp = &workers[0]; in rollforward()
477 wp->req[0] = *q; in rollforward()
478 nextblock = wp->tblock; in rollforward()
487 if (wp->sent) { in rollforward()
488 if (atomic_read(wp->fd, (void *)&got, sizeof got) in rollforward()
493 wp->sent = 0; in rollforward()
645 spcl.c_count = wp->count; in startnewtape()
650 spcl.c_firstrec = wp->firstrec; in startnewtape()
653 writeheader((ino_t)wp->inode); in startnewtape()
656 tapeno, wp->inode); in startnewtape()
713 if (i == wp - &workers[0]) { in create_workers()
786 while ((nread = atomic_read(cmd, (void *)wp->req, reqsiz)) == reqsiz) { in worker()
787 struct req *p = wp->req; in worker()
792 blkread(p->dblk, wp->tblock[trecno], in worker()
796 (void *)wp->tblock[trecno], in worker()
817 wrote = rmtwrite(wp->tblock[0]+size, in worker()
821 wrote = write(tapefd, wp->tblock[0]+size, in worker()