From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] tree problem From: "Russ Cox" Date: Thu, 3 May 2007 11:01:46 -0400 In-Reply-To: <599f06db0705030722y534dc22cn5c570f147c8a6e71@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070503150147.C2AAF1E8C1F@holo.morphisms.net> Topicbox-Message-UUID: 5723889a-ead2-11e9-9d60-3106f5b1d025 > 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. russ