From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Date: Thu, 26 Mar 2009 12:31:16 -0700 From: Roman Shaposhnik In-reply-to: <3A09771D-9AD3-4499-A354-A3111F5AD0EF@sun.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <584ACAD1-5343-4656-AEBC-8C0BFDD5724C@sun.com> References: <3A09771D-9AD3-4499-A354-A3111F5AD0EF@sun.com> Subject: Re: [9fans] 9P writes for directories Topicbox-Message-UUID: ca0bf566-ead4-11e9-9d60-3106f5b1d025 On Mar 21, 2009, at 12:00 AM, Roman Shaposhnik wrote: > I could swear that I remember the following question being asked > during > the times when 9P2000 was being introduced, but I simply can't find > any relevant threads. I do apologize if my google-foo is failing me, > but here it goes: what is the reason for not allowing writes to the > directories (with the append-only semantics and stat structures > payloads, of course)? > > Is it simply because since we can't really get rid of create (because > of the transactional nature of create-open) it was deemed to be > unimportant to have directory writing semantics or was there a > subtler reason that I can't fully recall. No takers, huh? Well, may be a bit of background would help so that the question doesn't sound as a purely navel-gazing exercise. The story here is that we are building a bunch of RESTful APIs and my personal preference is to bend HTTP as close to 9P as I can get (for obvious reasons). Now, the closest match to "create" would be POST with a metadata payload on a "subdirectory" URI. But of course, it is not a create at all. It really is much closer to write on a subdirectory. Hence the question: is there anything that HTTP makes us lose except for the transactional nature of create? Thanks, Roman.