9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] tree problem
Date: Thu,  3 May 2007 17:28:26 +0200	[thread overview]
Message-ID: <200705031528.l43FSQ006268@zamenhof.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Thu, 03 May 2007 11:01:46 -0400." <20070503150147.C2AAF1E8C1F@holo.morphisms.net>

> > The solution may, alternatively be to register a clunk()
> > function and each can do what they want with it though I
> > do not like it because I feel I should receive things related
> > with files and not with fids.
> 
> the read and write requests you receive are for fids,
> not files.  you pull out the file using fid->file.
> 
> you can use destroyfid to find out when a fid is 
> completely clunked.  from 9p(2):
> 
>           Destroyfid
>                When a Fid's reference count drops to zero (i.e., it
>                has been clunked and there are no outstanding requests
>                referring to it), destroyfid is called to allow the
>                program to dispose of the fid->aux pointer.
> 
> you can get at the file by using fid->file.

at a time I had modified my local lib9p to be able
to register a clunk function.

I needed it for a 'filterfs' that sits between a user
and another file server.
it forwarded each incoming request (potentially modified)
to the other file server, and handed back its responses
(potentially modified) to the user.
the forwarded requests contained the fids as given by the user.

I needed to forward the clunk immediately, because
otherwise the user might not be able to reuse a fid
immediately after having clunked it (more accurately:
if the user would do so, and the 'other' file server
would not see the clunk before the reuse, there might
be trouble.)


Axel.


  reply	other threads:[~2007-05-03 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-03 14:22 Gorka Guardiola
2007-05-03 15:01 ` Russ Cox
2007-05-03 15:28   ` Axel Belinfante [this message]
2007-05-03 15:40     ` ron minnich
2007-05-03 15:55     ` Russ Cox
2007-05-03 16:25   ` Gorka Guardiola
2007-05-03 17:22     ` Russ Cox
2007-05-04  7:53       ` Gorka Guardiola
2007-05-03 17:30     ` rog
2007-05-03 20:21       ` Charles Forsyth

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=200705031528.l43FSQ006268@zamenhof.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --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).