9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "nicolagi via 9fans" <9fans@9fans.net>
To: 9fans@9fans.net
Subject: Re: [9fans] 9P reading directories client/server behavior
Date: Tue, 9 Mar 2021 14:05:45 +0000
Message-ID: <202103091405.129E5mMY002773@sdf.org> (raw)

As it often happens to me, a few minutes after hitting send, I am
enlightened and embarassed. :-) I had a bit of tunnel vision there, and
didn't think of looking at another 9P trace.  When I run "9p ls foo/bar"
I get the below trace, which answers most of my questions.

        Tread tag 0 fid 1 offset 0 count 8168
        Rread tag 0 count 8109
        Tread tag 0 fid 1 offset 8109 count 8168
        Rread tag 0 count 5410
        Tread tag 0 fid 1 offset 13519 count 8168
        Rread tag 0 count 0

I took a quick look at sys/src/cmd/cwfs/9p2.c and I think it shows the
server should silently return 0 bytes and no errors, even if the 0-byte
return is due to the read buffer not being large enough for the next
dir entry.

The only question that still stands is the last in my original post:
What happens and what should happen when a dir entry is larger than
msize-24? Possibly written from a connection with a large msize, and to
be read from a connection with a smaller msize?

Thanks,

Nicola


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T42be63e964005519-Md34dba086f695e0bf63be25f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

             reply	other threads:[~2021-03-09 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 14:05 nicolagi via 9fans [this message]
2021-03-09 20:01 ` Anthony Martin
  -- strict thread matches above, loose matches on Subject: below --
2021-03-10 19:36 nicolagi via 9fans
2021-03-09 13:32 nicolagi via 9fans
2021-04-09 20:00 ` Russ Cox
2021-04-14 18:06   ` nicolagi via 9fans

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=202103091405.129E5mMY002773@sdf.org \
    --to=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

9fans - fans of the OS Plan 9 from Bell Labs

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9fans 9fans/ http://inbox.vuxu.org/9fans \
		9fans@9fans.net
	public-inbox-index 9fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git