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

Re: [Xen-devel] [PATCH v2 16/18] libxl: introduce libxl_userdata_unlink



On Wed, Aug 27, 2014 at 03:16:59AM +0100, Ian Campbell wrote:
> On Wed, 2014-07-30 at 19:23 +0100, Wei Liu wrote:
> > +    CTX_LOCK;
> > +    lock = libxl__lock_domain_data(gc, domid);
> > +    if (!lock) {
> 
> This seems like a quirk which deserves commenting on since this lock
> only protects a specific type of userdata, specifically the libxl-json
> userdata.
> 

The original intent for that lock is to protect all application defined
data -- the name in registry is "libxl-lock" not "libxl-json-lock".

Though through out this series it's mostly used to protect libxl-json
data, it doesn't preclude us from using it to protect other type of
userdata.

> Any app defined data is not actually protected by this lock in general.
> I haven't yet seen the caller but it seems odd that the application
> would be allowed to unlink the libxl-json file, so I'm not sure why this
> function needs to worry about the lock (instead of insisting that the
> libxl-internal caller deals with it)
> 

This function is specificly introduced for next patch.

During review last round we discussed how we should deal with "xl
config-udpate" command. The conclusion is that we still honour user
supplied config file and it has higher priority than libxl-json. We
would like to transform the config file supplied by user to libxl-json,
then remove that user supplied file, so that next time domain is
rebooted it always has the config tracked by libxl. Without this patch
xl has no way to unlink that file and it will still take effect during
next reboot, which is not what we want.

Wei.

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