On Mon Oct 25 22:03:53 EDT 2010, [email protected] wrote:
> hm... wouldnt it just crash if mh->mount is nil?
>
perhaps you are reading the diff backwards? it used to
crash when mh->mount was nil. leading to a lock loop.
i added the test to see that mh->mount != nil after the
rlock on mh->lock is acquired. otherwise, there is a race
with unmount which can make mh->mount nil while we're running.
our newer faster processors with more cores were making
this event likely enough that a few receipies would crash
the machine within 5 minutes.
- erik
---
/n/sources/plan9//sys/src/9/port/chan.c:1012,1018 - chan.c:1012,1020
/*
* mh->mount->to == c, so start at
mh->mount->next
*/
+ f = nil;
rlock(&mh->lock);
+ if(mh->mount)
for(f = mh->mount->next; f; f = f->next)
if((wq = ewalk(f->to, nil, names+nhave,
ntry)) != nil)
break;