9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Francisco J Ballesteros <nemo@lsub.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] clone files and Srv->clone
Date: Sat, 10 Dec 2005 19:14:37 +0100	[thread overview]
Message-ID: <8ccc8ba40512101014r135371c0y609a410db2e6b258@mail.gmail.com> (raw)
In-Reply-To: <20051210174306.GB406@routi.local.net>

srv->clone clones a client fid. You can think of it like
doing a dup of a file descriptor. You obtain a new fid that is a clone
of the old one. Try man 5 clone.

Walk1 walks a name. For example, you might have a fid for your
/ file. After a walk1 "a" on that fid, your fid now points to "/a". See
man 5 walk.

You might do a clone file but that has nothing to do with walk and clone.
For example, you might arrange for your srv->open to create a new file
each time, and then make the fid point to it. That way, each open(2)
would obtain a cloned file.

Run for example ramfs with -D, play with touch ls and the like, and look
at the 9p messages printed by ramfs. Section 5 describes the whole
protocol.

hth

On 12/10/05, Sascha Retzki <sretzki@gmx.de> wrote:
> Evenin',
>
>
> I've got a question about the process of cloning in the 9p(2) sense and
> in the sense of e.g. webfs does: Is it the same?
>
> Or, to explain my problem from the top-down perspective, I want my lil
> file-server to have a clone-file. On read, a new directory with a tree
> is created and the name of this new directory is returned. Is it that I
> have to do that mostly manually, or can Srv->walk1 and Srv->clone help
> me? If yes, how (rougly)? Or am I mistaken, and there is some all-in-one
> solution to my problem (because many file-server do it in this way, I
> assume there is some library-calls for that?)
>
>
> Thanks, Sascha
>
>

  reply	other threads:[~2005-12-10 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-10 17:43 Sascha Retzki
2005-12-10 18:14 ` Francisco J Ballesteros [this message]
2005-12-10 20:40   ` Russ Cox
2005-12-10 21:38     ` Francisco J Ballesteros

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=8ccc8ba40512101014r135371c0y609a410db2e6b258@mail.gmail.com \
    --to=nemo@lsub.org \
    --cc=9fans@cse.psu.edu \
    /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).