From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] 9vx (is this the right list)? import issue
Date: Tue, 22 Sep 2009 22:36:36 -0400 [thread overview]
Message-ID: <fadaba2046122acf656140c0618e1d1e@ladd.quanstro.net> (raw)
In-Reply-To: <<13426df10909221532t5de9f010pfeb2ca2c3b44db89@mail.gmail.com>>
ron,
this works for me but my symptoms were a little different than yours.
before:
mnt: proc cat 290: mismatch from #D/ssl/1/data /n/coraid/lib/unicode rep 0x7fcd8c04e190 tag 4 fid 1603 T120 R117 rp 4
after:
WOOT! caught stale reply 6; type 117
note: the poor organization of this patch is geared toward keeping the
diff small. tagallocd and freetag should be moved above mountmux.
i didn't use russ' ed scripts because i was too lazy.
- erik
9vx version
; ; diff -c devmnt.c devmnt.c~
devmnt.c:945,954 - devmnt.c~:945,951
void
mountmux(Mnt *m, Mntrpc *r)
{
- int bad;
Mntrpc **l, *q;
- int tagallocd(int);
- void freetag(int);
lock(&m->lk);
l = &m->queue;
devmnt.c:977,992 - devmnt.c~:974,981
}
l = &q->list;
}
- bad = 1;
- if(tagallocd(r->reply.tag)){
- freetag(r->reply.tag);
- bad = 0;
- }
unlock(&m->lk);
- if(bad)
- print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
- else
- print("WOOT! caught stale reply %ud; type %d\n", r->reply.tag, r->reply.type);
+ print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
}
/*
devmnt.c:1054,1065 - devmnt.c~:1043,1048
return NOTAG;
}
- int
- tagallocd(int t)
- {
- return mntalloc.tagmask[t>>TAGSHIFT] & 1<<(t&TAGMASK);
- }
-
void
freetag(int t)
{
devmnt.c:1125,1136 - devmnt.c~:1108,1116
if(mntalloc.nrpcfree >= 10){
free(r->rpc);
free(r);
- if(r->done != 2)
- freetag(r->request.tag);
+ freetag(r->request.tag);
}
else{
- if(r->done == 2)
- r->request.tag = alloctag();
r->list = mntalloc.rpcfree;
mntalloc.rpcfree = r;
mntalloc.nrpcfree++;
devmnt.c:1145,1151 - devmnt.c~:1125,1131
Mntrpc **l, *f;
lock(&m->lk);
- r->done = 2;
+ r->done = 1;
l = &m->queue;
for(f = *l; f; f = f->list) {
plan 9 version
; diffy -c devmnt.c
/n/dump/2009/0922/sys/src/9/port/devmnt.c:932,938 - devmnt.c:932,941
void
mountmux(Mnt *m, Mntrpc *r)
{
+ int bad;
Mntrpc **l, *q;
+ int tagallocd(int);
+ void freetag(int);
lock(m);
l = &m->queue;
/n/dump/2009/0922/sys/src/9/port/devmnt.c:961,968 - devmnt.c:964,977
}
l = &q->list;
}
+ bad = 1;
+ if(tagallocd(r->reply.tag)){
+ freetag(r->reply.tag);
+ bad = 0;
+ }
unlock(m);
- print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
+ if(bad)
+ print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
}
/*
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1030,1035 - devmnt.c:1039,1050
return NOTAG;
}
+ int
+ tagallocd(int t)
+ {
+ return mntalloc.tagmask[t>>TAGSHIFT] & 1<<(t&TAGMASK);
+ }
+
void
freetag(int t)
{
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1095,1103 - devmnt.c:1110,1121
if(mntalloc.nrpcfree >= 10){
free(r->rpc);
free(r);
- freetag(r->request.tag);
+ if(r->done != 2)
+ freetag(r->request.tag);
}
else{
+ if(r->done == 2)
+ r->request.tag = alloctag();
r->list = mntalloc.rpcfree;
mntalloc.rpcfree = r;
mntalloc.nrpcfree++;
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1112,1118 - devmnt.c:1130,1136
Mntrpc **l, *f;
lock(m);
- r->done = 1;
+ r->done = 2;
l = &m->queue;
for(f = *l; f; f = f->list) {
------------------------------------------------------------------
plan 9 version
; - diffy
diffy -c devmnt.c
/n/dump/2009/0922/sys/src/9/port/devmnt.c:932,938 - devmnt.c:932,941
void
mountmux(Mnt *m, Mntrpc *r)
{
+ int bad;
Mntrpc **l, *q;
+ int tagallocd(int);
+ void freetag(int);
lock(m);
l = &m->queue;
/n/dump/2009/0922/sys/src/9/port/devmnt.c:961,968 - devmnt.c:964,979
}
l = &q->list;
}
+ bad = 1;
+ if(tagallocd(r->reply.tag)){
+ freetag(r->reply.tag);
+ bad = 0;
+ }
unlock(m);
- print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
+ if(bad)
+ print("unexpected reply tag %ud; type %d\n", r->reply.tag, r->reply.type);
+ else
+ print("WOOT! caught stale reply %ud; type %d\n", r->reply.tag, r->reply.type);
}
/*
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1030,1035 - devmnt.c:1041,1052
return NOTAG;
}
+ int
+ tagallocd(int t)
+ {
+ return mntalloc.tagmask[t>>TAGSHIFT] & 1<<(t&TAGMASK);
+ }
+
void
freetag(int t)
{
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1095,1103 - devmnt.c:1112,1123
if(mntalloc.nrpcfree >= 10){
free(r->rpc);
free(r);
- freetag(r->request.tag);
+ if(r->done != 2)
+ freetag(r->request.tag);
}
else{
+ if(r->done == 2)
+ r->request.tag = alloctag();
r->list = mntalloc.rpcfree;
mntalloc.rpcfree = r;
mntalloc.nrpcfree++;
/n/dump/2009/0922/sys/src/9/port/devmnt.c:1112,1118 - devmnt.c:1132,1138
Mntrpc **l, *f;
lock(m);
- r->done = 1;
+ r->done = 2;
l = &m->queue;
for(f = *l; f; f = f->list) {
next parent reply other threads:[~2009-09-23 2:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<13426df10909221532t5de9f010pfeb2ca2c3b44db89@mail.gmail.com>
2009-09-23 2:36 ` erik quanstrom [this message]
[not found] <<dd6fe68a0909222111y1af0f4a2qd30a3b4eded30b2b@mail.gmail.com>
2009-09-23 4:56 ` erik quanstrom
2009-09-23 18:52 ` Russ Cox
2009-09-23 19:12 ` ron minnich
2009-09-23 19:25 ` erik quanstrom
2009-09-23 19:26 ` Russ Cox
2009-09-23 20:33 ` ron minnich
2009-09-23 20:35 ` ron minnich
2009-09-23 22:13 ` Russ Cox
2009-09-23 21:25 ` erik quanstrom
[not found] <<dd6fe68a0909222011u4243953dged01d77ecdc93e46@mail.gmail.com>
2009-09-23 3:17 ` erik quanstrom
2009-09-23 4:11 ` Russ Cox
[not found] <<fadaba2046122acf656140c0618e1d1e@ladd.quanstro.net>
2009-09-23 2:41 ` erik quanstrom
2009-09-23 3:11 ` Russ Cox
[not found] <<13426df10909221420x1298139fhdeb4f0803924e5a3@mail.gmail.com>
2009-09-22 21:23 ` erik quanstrom
2009-09-22 22:32 ` ron minnich
[not found] <<df49a7370909221158u3f071cc3j125c85241c5088e6@mail.gmail.com>
2009-09-22 19:01 ` erik quanstrom
2009-09-22 19:34 ` roger peppe
2009-09-22 21:12 ` ron minnich
2009-09-22 21:20 ` ron minnich
[not found] <<13426df10909221147w665e30adt93b6121281294647@mail.gmail.com>
2009-09-22 18:51 ` erik quanstrom
2009-09-21 18:29 ron minnich
2009-09-22 5:51 ` Russ Cox
2009-09-22 17:27 ` ron minnich
2009-09-22 18:21 ` ron minnich
2009-09-22 18:35 ` roger peppe
2009-09-22 18:47 ` ron minnich
2009-09-22 18:58 ` roger peppe
2009-09-22 19:08 ` Eric Van Hensbergen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fadaba2046122acf656140c0618e1d1e@ladd.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).