Lines Matching full:wp

104 static struct worker *wp;  variable
148 wp = &workers[0]; in alloctape()
149 wp->count = 1; in alloctape()
150 wp->tapea = 0; in alloctape()
151 wp->firstrec = 0; in alloctape()
152 nextblock = wp->tblock; in alloctape()
160 wp->req[trecno].dblk = (ufs2_daddr_t)0; in writerec()
161 wp->req[trecno].count = 1; in writerec()
181 wp->req[trecno].dblk = dblkno; in dumpblock()
182 wp->req[trecno].count = avail; in dumpblock()
228 int siz = (char *)nextblock - (char *)wp->req; in flushtape()
230 wp->req[trecno].count = 0; /* Sentinel */ in flushtape()
232 if (atomic_write(wp->fd, (const void *)wp->req, siz) != siz) in flushtape()
234 wp->sent = 1; /* we sent a request, read the response later */ in flushtape()
236 lastfirstrec = wp->firstrec; in flushtape()
238 if (++wp >= &workers[WORKERS]) in flushtape()
239 wp = &workers[0]; in flushtape()
242 if (wp->sent) { in flushtape()
243 if (atomic_read(wp->fd, (void *)&got, sizeof got) in flushtape()
248 wp->sent = 0; in flushtape()
284 wp->count = lastspclrec + blks + 1 - spcl.c_tapea; in flushtape()
285 wp->tapea = spcl.c_tapea; in flushtape()
286 wp->firstrec = lastfirstrec + ntrec; in flushtape()
287 wp->inode = curino; in flushtape()
288 nextblock = wp->tblock; in flushtape()
407 otb = (union u_spcl *)wp->tblock; in rollforward()
414 for (p = wp->req; p->count > 0; p += p->count) { in rollforward()
436 spcl.c_tapea = wp->tapea; in rollforward()
442 if (atomic_write(wp->fd, (const void *)q, size) != size) { in rollforward()
446 wp->sent = 1; in rollforward()
447 if (++wp >= &workers[WORKERS]) in rollforward()
448 wp = &workers[0]; in rollforward()
471 wp->req[0] = *q; in rollforward()
472 nextblock = wp->tblock; in rollforward()
481 if (wp->sent) { in rollforward()
482 if (atomic_read(wp->fd, (void *)&got, sizeof got) in rollforward()
487 wp->sent = 0; in rollforward()
639 spcl.c_count = wp->count; in startnewtape()
644 spcl.c_firstrec = wp->firstrec; in startnewtape()
647 writeheader((ino_t)wp->inode); in startnewtape()
650 tapeno, wp->inode); in startnewtape()
707 if (i == wp - &workers[0]) { in create_workers()
780 while ((nread = atomic_read(cmd, (void *)wp->req, reqsiz)) == reqsiz) { in worker()
781 struct req *p = wp->req; in worker()
786 blkread(p->dblk, wp->tblock[trecno], in worker()
790 (void *)wp->tblock[trecno], in worker()
811 wrote = rmtwrite(wp->tblock[0]+size, in worker()
815 wrote = write(tapefd, wp->tblock[0]+size, in worker()