From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3461107aee09ecf85ba989151904bbe2@cat-v.org> To: 9fans@cse.psu.edu Subject: Re: [9fans] 9p and how can I know when a write is finished Date: Wed, 1 Mar 2006 18:21:00 +0100 From: uriel@cat-v.org In-Reply-To: <4405D2A2.4040505@lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 077ca840-ead1-11e9-9d60-3106f5b1d025 > you guys are all confusing me. AFAIK, if you have written a plan 9 > server, you have the standard Ye Olde Server Dispatche Functionne. > > Said function, when it gets a Req with an op type of Twrite, calls the > appropriate server function, and replies. That is not the issue, the issue is that a single write() call can turn into various Twrite operations. > I just finished writing another one of these (A GPS server ... fun!) and > it all Just Works. What is wrong with gpsfs(8)? > So, I don't see the problem. Plan 9 packet sizes can be pretty big --- > much much bigger then the MTU on a network -- so the 9p server code > deals with it. When your Twrite gets called, it has the data. iounit also can be quite small, webfs for example is broken for even slightly long URLs because it assumes they fit in a single Twrite, and quite often they don't. >>From reading section 5 of the man pages, somehow I had (incorrectly) understood that a Tclunk was not warranted to follow immediately a close(), which seems to be only partially true as russ explained. Maybe the bottom of clunk(5) should clarify that close() only generates a Tclunk when it's the last reference to the fd is closed? uriel