From: Ian Jackson Subject: Re: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown Date: Tue, 24 Nov 2015 17:38:56 +0000 Message-ID: <22100.41136.889068.899352@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> <22100.40258.828398.202555@mariner.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F695972@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a1HYU-0007YR-Cb for xen-devel@lists.xenproject.org; Tue, 24 Nov 2015 17:39:02 +0000 In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02F695972@AMSPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: "xen-devel@lists.xenproject.org" , Stefano Stabellini , Ian Campbell , Wei Liu List-Id: xen-devel@lists.xenproject.org Paul Durrant writes ("RE: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown"): > From: Ian Jackson [mailto:Ian.Jackson@eu.citrix.com] > > And even if the node did somehow end up with a nonempty value, nothing > > would break because no-one would read it. > > Maybe. Personally I would have thought a toolstack would want to put things into a known state and XS_MKDIR just doesn't do that. Hrm. > > > If you use XS_WRITE then it is and I think that is the correct > > > semantic here (even though we happen to get away with it at the > > > moment). I'm happy with the function rename, but would you be happy > > > with the change in semantic? > > > > XS_MKDIR creates missing parents, which XS_WRITE doesn't. > > According to the documentation it does: (from xenstore.txt) > > READ | > WRITE | > Store and read the octet string at . > WRITE creates any missing parent paths, with empty values. Oh! Well so then perhaps we should jsut change libxl__xs_mkdir to use WRITE. This rather confusing situation is probably worth a doc comment next to the prototype in libxl_internal.h. Ian.