[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown



Paul Durrant writes ("RE: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() 
for ~/control/shutdown"):
> [Ian Jackson:]
> > I'm not sure I follow this argument.  What did you think of my idea
> > of renaming libxl__xs_mkdir to libxl__xs_mknode ?
> 
> 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.

It is guaranteed to be empty if nothing ever wrote anything non-empty
to it.  I think participants in xenstore protocols, and users of
xenstore to store things, are entitled to assume that no-one writes
nonempty values to nodes that aren't supposed to have nonempty values.

And even if the node did somehow end up with a nonempty value, nothing
would break because no-one would read it.

> 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.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.