From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <317e48249cbfecef84062b5463b65b8d@plan9.bell-labs.com> References: <317e48249cbfecef84062b5463b65b8d@plan9.bell-labs.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Latchesar Ionkov Subject: Re: [9fans] QTCTL? Date: Thu, 1 Nov 2007 09:51:02 -0600 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: e34ab078-ead2-11e9-9d60-3106f5b1d025 On Nov 1, 2007, at 9:26 AM, Sape Mullender wrote: > One could have only client-server-client calls like this: > > Tcache asks whether the server is prepared to cache > Rcache makes lease available with parameters, Rerror says no. > > Tlease says, ok start my lease now (almost immediately follows Rache) > Rlease lease expired or lease needs to be given back early > > Tcache done with old lease (may immediately ask for a new lease) > etc. > > So Tcache serves two purposes: it gives up an old lease if one existed > and immediately asks for a new one if one is needed. > > This might give all the functionality we need without using callbacks. > (Of course, the client still needs a proc waiting for that Rlease > while > doing its reads and writes). In the case of read cache (which is probably going to be used more often than write-cache), the client needs to send two RPC every time a writer modifies the cached file. What if Rlease doesn't necessary break the lease, but have an option (negotiated in Tcache) to let the client know that the file is changed without breaking the lease. Thanks, Lucho