Re: [9fans] tree problem



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.
.



Relevant Pages

  • Re: [9fans] tree problem
    ... to register a clunk function. ... to the other file server, ... the forwarded requests contained the fids as given by the user. ... fid space, ...
    (comp.os.plan9)
  • Re: [9fans] About 9P ...
    ... This would also work if FIDs ... So unless Russ is right and that the fact FIDS are choosen by the client ... > in the same order as the requests, ... >> At that point you're still pipelining, ...
    (comp.os.plan9)
  • Re: [9fans] About 9P ...
    ... The fact request can be pipelined like this -I mean, by taking care of the ... This would also work if FIDs ... in the same order as the requests, ... At that point you're still pipelining, and since you're reading presumably into separate buffers, or different locations in the same buffer, who cares about the order? ...
    (comp.os.plan9)
  • Re: [9fans] About 9P ...
    ... Note that several different fids might be used in these ... I tried to imagine how to bundle them, for using 9P over high latency links, ... the same descriptor, and also in that paths are sent along with the ...
    (comp.os.plan9)