History

eric loves regressions. w

npe committed 16 years ago

Commit b4c67d62 parents 358e671 ce289164 files · +51 −10Browse files

Unified · Split

4 files
  1. sys/src/cmd/uem/execfs.c +0 −3
  2. sys/src/cmd/uem/gangfs.c +0 −1
  3. sys/src/cmd/uem/mpipefs.c +4 −6
  4. sys/src/cmd/uem/tests/mpipefs.rc +47 −0
sys/src/cmd/uem/execfs.c+0−3
@@ -127,7 +127,6 @@ kickit(void) · 126 unmodified lines
127127 DPRINT(DERR, "*ERROR*: Problem with cloneproc\n");
128128 }
129129
130− chanclose(pidc);
131130 chanfree(pidc);
132131
133132 return pid;
@@ -328,9 +327,7 @@ fsclunk(Fid *f) · 194 unmodified lines
328327 static void
329328 cleanup(Srv *)
330329 {
331− chanclose(iochan);
332330 chanfree(iochan);
333− chanclose(clunkchan);
334331 chanfree(clunkchan);
335332 free(srvctl);
336333 threadexitsall("done");
sys/src/cmd/uem/gangfs.c+0−1
@@ -775,7 +775,6 @@ releasesessions(Gang *g) · 774 unmodified lines
775775
776776 for(count = 0; count < g->size; count++) {
777777 free(g->sess[count].path);
778− chanclose(g->sess[count].chan);
779778 chanfree(g->sess[count].chan);
780779 close(g->sess[count].fd);
781780 }
sys/src/cmd/uem/mpipefs.c+4−6
@@ -221,7 +221,6 @@ usage(void) · 220 unmodified lines
221221 static void
222222 killall(Srv*)
223223 {
224− chanclose(iochan);
225224 chanfree(iochan);
226225 threadexitsall("killall");
227226 }
@@ -356,11 +355,9 @@ closebcasts(Mpipe *mp) · 128 unmodified lines
356355 {
357356 Fidaux *c;
358357
359− qlock(&mp->l);
360358 for(c=mp->bcastr; c != nil; c=c->next) {
361359 chanclose(c->chan);
362360 }
363− qunlock(&mp->l);
364361 }
365362
366363 /* process mount options */
@@ -503,8 +500,10 @@ fsclunk(Fid *fid) · 136 unmodified lines
503500 /* writer accounting and cleanup */
504501 if((fid->omode&OMASK) == OWRITE) {
505502 /* TODO: what do we do with outstanding requests? */
503+ DPRINT(DWRT, "---- fid %d writers now %d\n", fid->fid, mp->writers-1);
504+ qlock(&mp->l);
506505 mp->writers--;
507− DPRINT(DWRT, "---- fid %d writers now %d\n", fid->fid, mp->writers);
506+
508507 if((aux->state != FID_CTLONLY) && (mp->writers == 0)) {
509508 for(count=0;count < mp->slots; count++)
510509 if(mp->rrchan[count]) {
@@ -514,6 +513,7 @@ fsclunk(Fid *fid) · 3 unmodified lines
514513 if(mp->mode == MPTbcast)
515514 closebcasts(mp);
516515 }
516+ qunlock(&mp->l);
517517
518518 free(aux);
519519 fid->aux = nil;
@@ -902,7 +902,6 @@ fsbcast(Req *r, Mpipe *mp) · 382 unmodified lines
902902 if(!err)
903903 r->ofcall.count = r->ifcall.count;
904904
905− chanclose(reterr);
906905 chanfree(reterr);
907906
908907 return err;
@@ -1056,7 +1055,6 @@ parseheader(Req *r, Mpipe *mp, Fidaux *aux) · 147 unmodified lines
10561055 else
10571056 proccreate(splicefrom, sa, STACK);
10581057 err = recvp(sa->chan); /* sync */
1059− chanclose(sa->chan);
10601058 chanfree(sa->chan);
10611059 return err;
10621060 break;
sys/src/cmd/uem/tests/mpipefs.rc+47−0
@@ -290,6 +290,52 @@ fn spliceto { · 289 unmodified lines
290290 rm -rf $TESTDIR/*
291291 }
292292
293+#
294+# splice to chain to tests problem
295+# experienced using multinode gangfs
296+#
297+
298+fn splicetochain {
299+ echo -n Testing spliceto chains...
300+
301+ # initialize test files
302+ echo Hello Squidboy > $TESTDIR/test
303+ echo > $TESTDIR/test1
304+
305+ # accomplish the test
306+ # stage0 and stage1 feeds stage2 which feeds stage3
307+ mount /srv/mpipe /n/stage0 s0
308+ mount /srv/mpipe /n/stage1 s1
309+ mount /srv/mpipe /n/stage2 s2
310+ mount /srv/mpipe /n/stage3 s3
311+ mp-writer -o /n/stage2/s2 /n/stage0/s0
312+ mp-writer -o /n/stage2/s2 /n/stage1/s1
313+ mp-writer -o /n/stage3/s3 /n/stage2/s2
314+ mp-writer -o $TESTDIR/test1 /n/stage3/s3
315+ echo one > /n/stage0/s0 &
316+ echo two > /n/stage1/s1 &
317+
318+ sleep 1
319+
320+ unmount /n/stage0
321+ unmount /n/stage1
322+ unmount /n/stage2
323+ unmount /n/stage3
324+
325+ # verify results
326+ echo one > $TESTDIR/test2
327+ echo two >> $TESTDIR/test2
328+ if(! cmp -s $TESTDIR/test2 $TESTDIR/test1) {
329+ echo FAILED: test1 not equal to test2
330+ exit 'splicetochain: failed'
331+ }
332+
333+ echo Success!
334+
335+ # cleanup
336+ rm -rf $TESTDIR/*
337+}
338+
293339 #
294340 # Broadcast spliceto test
295341 #
@@ -342,6 +388,7 @@ splicefrom · 46 unmodified lines
342388 spliceto
343389 splicetobcast
344390 splicefrombcast
391+splicetochain
345392
346393 # Cleanup
347394 rm -f $TESTDIR

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t