From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4f6252ddf4d490154196c024ca1a1e5e@quanstro.net> From: erik quanstrom Date: Mon, 10 Aug 2009 14:57:50 -0400 To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] bind vs. 9660srv Topicbox-Message-UUID: 41029134-ead5-11e9-9d60-3106f5b1d025 > 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