> Not the code I'm looking at
> (/sys/src/cmd/cwfs/9p2.c)
>
> start += n;
> if(start < offset)
> continue;
> if(count < n){
> putbuf(p1);
> goto out1;
> }
i think that it recomputes what the offset should be,
which might work as long as the offsets aren't
too different. and the error has the right sign.
ramfs does something similar, which also happened
to work out in the cases i tested.
from slightly above the point you mention:
dread:
/*
* Pick up where we left off last time if nothing has changed,
* otherwise must scan from the beginning.
*/
if(offset == file->doffset /*&& file->qid.vers == file->dvers*/){
addr = file->dslot/DIRPERBUF;
slot = file->dslot%DIRPERBUF;
start = offset;
}
else{
addr = 0;
slot = 0;
start = 0;
}
- erik