9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Butler gdb@dbsystems.com
Subject: [9fans] Re: 9p question
Date: Tue,  7 Mar 2000 09:32:30 +0000	[thread overview]
Message-ID: <20000307093230.rUkjkwPbuf2Aky0c-yqjdLEsCcufJPLYpDvbs_WoH4s@z> (raw)

Roman Shaposhnick <vugluskr@unicorn.math.spbu.ru> wrote in message
news:slrn8c7lt4.c7k.vugluskr@unicorn.math.spbu.ru...
> On Tue, 29 Feb 2000 09:29:38 GMT, David Butler wrote:
> >Roman Shaposhnick <vugluskr@unicorn.math.spbu.ru> wrote in message
> >news:slrn8bfrif.u5c.vugluskr@unicorn.math.spbu.ru...

> To be more precise there are several things that can not stop bothering
me:
>
>     1. I still consider the Tclone/Topen/Tread/Tclunk a bit lengthy, and
>     still can not understand limitations of why we can not walk opened
>     fids.

If Twalk was allowed on an open fid, (assuming it is a directory,
because if it is a file it doesn't make any sense) does that mean
you are done reading the directory?  If you are, you should release
the resources keeping track of the open context, so you still need a
Tclunk.  Perhaps you would need a new clunk that says "leave the
fid pointing to the directory, so I can walk it".  That would be like
a clunk/walk.  Instead of doing that, why don't you simply have a
Tclunk and a Tclwalk?  In other words, the result is the same.

The real reason for the "lengthy" conversation is the Tclone/Twalk
part.  That is part of the price that is paid to remove the '/' as a
directory separator, which IMHO is a good thing.

>     2. Why directories have a conventional length of 0? IMHO, it is very
>     annoying, since the only way to know the exact number of
>     directory entries is to read it up to the end.

There is more to the issue than just the 0, though.  Directories in
Plan9 have no "holes" (according to the protocol) and can NOT
be seek(2)ed into.  In other words, you can ONLY sequentially
read a directory.  The theory breaks down real fast when you read
a directory that concurrently has creates and removes occuring.
I've seen ls(1) both list file names twice and not show files that
actually exist!  What is more interesting is that the behavior is
different between file servers implemented in the cpu/terminal
kernel vs kfs or "the file server".  In my system I've made them
consistent and fixed the dup/missing names by making directories
seekable (to a point.  seek(fd, n, 2) == seek(fd, n, 0) because the
length of a directory is still 0, as it should be).

> available info would be enough for me. By the way, why htmled man pages
> have a lot of HTML errors ? If  this is a bug, then may be somewhere there
> is a site with P9 htmled man pages that I can read, not decode ?

Since Plan9 is copyrighted and there are no other distributors of the
system commercially, the manuals can only be seen on bell-labs site
from the web.  I don't see any formating issues with section 5 of the
manual (where 9P is documented) so I don't know why you would
have a problem.  Perhaps you could give a URL of a problem page?




             reply	other threads:[~2000-03-07  9:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-07  9:32 David [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-16 14:05 presotto
2000-03-14 14:51 forsyth
2000-03-13 12:01 Roman
2000-03-13  9:28 Douglas
2000-03-11 15:00 rob
2000-03-11  9:53 Vladimir
2000-03-10 11:02 forsyth
2000-03-10  9:23 Roman
2000-03-10  9:23 David
2000-03-09 19:04 forsyth
2000-03-09 18:10 Roman
2000-03-09 18:05 Roman
2000-03-09 15:33 presotto
2000-03-09 14:44 Roman
2000-03-09 14:21 Roman
2000-03-09 13:50 rob
2000-03-09 13:18 presotto
2000-03-09 10:50 forsyth
2000-03-09 10:39 forsyth
2000-03-09 10:02 Douglas
2000-03-09  9:26 Roman
2000-02-28 18:07 rob

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=20000307093230.rUkjkwPbuf2Aky0c-yqjdLEsCcufJPLYpDvbs_WoH4s@z \
    --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
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).