9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] bind vs. 9660srv
Date: Mon, 10 Aug 2009 14:57:50 -0400	[thread overview]
Message-ID: <4f6252ddf4d490154196c024ca1a1e5e@quanstro.net> (raw)
In-Reply-To: <dd6fe68a0908101150i52b92319y4c4acd287ea065f9@mail.gmail.com>

> 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



      reply	other threads:[~2009-08-10 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 14:41 erik quanstrom
2009-08-10 17:29 ` Russ Cox
2009-08-10 18:27   ` erik quanstrom
2009-08-10 18:50     ` Russ Cox
2009-08-10 18:57       ` erik quanstrom [this message]

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=4f6252ddf4d490154196c024ca1a1e5e@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).