From: Ian Jackson Subject: Re: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown Date: Wed, 25 Nov 2015 11:11:59 +0000 Message-ID: <22101.38783.523963.157266@mariner.uk.xensource.com> References: <1447258719-21891-1-git-send-email-paul.durrant@citrix.com> <1447258719-21891-3-git-send-email-paul.durrant@citrix.com> <22090.4182.47345.718602@mariner.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F673A1F@AMSPEX01CL01.citrite.net> <22090.4808.733814.408085@mariner.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F673B74@AMSPEX01CL01.citrite.net> <22100.37275.70733.869315@mariner.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F69590A@AMSPEX01CL01.citrite.net> <1448448166.17688.47.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a1XzZ-0000m7-0K for xen-devel@lists.xenproject.org; Wed, 25 Nov 2015 11:12:05 +0000 In-Reply-To: <1448448166.17688.47.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xenproject.org" , Paul Durrant , Stefano Stabellini , Wei Liu List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown"): > On Tue, 2015-11-24 at 17:20 +0000, Paul Durrant wrote: > > The issue, as I said, is the initial state of the node. If you use > > XS_MKDIR then it is not guaranteed to be empty. > > Just to satisfy my curiosity, how can it be non-empty? What else could it > possibly contain, just garbage? AIUI Paul is worried about the hypothetical possibility that someone might call libxl__xs_mkdir - on a path which already exists; - and has a nonempty value; - expecting the nonempty value to be cleared. I think this is too remote a possibility to be concerned about. But since the WRITE operation has identical semantics to MKDIR _except_ that it overwrites the existing value, I don't mind if Paul cares about this and wants to change libxl to always use WRITE and never MKDIR.[1] Ian. [1] There are AFAIAA no existing xenstore protocols or uses where a node is deliberately used both to store a value, and as a parent for descendent nodes. We don't seem likely to introduce any such thing, because it would be confusing.