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

Re: [Xen-devel] [PATCH V5 31/32] libxl: update domain configuration when updating memory targets



Ian Campbell writes ("Re: [PATCH V5 31/32] libxl: update domain configuration 
when updating memory targets"):
> On Tue, 2014-05-20 at 16:44 +0100, Ian Jackson wrote:
> > Merging the lists from libxl_device_disk_list and the JSON
> > configuration shouldn't be too hard and will eliminate a lot of worry
> > about races.
> 
> I think the presence of defaults in the libxl API makes it hard.

What I'm suggesting for the implementation of "get list of disks for
retreived configuration" is something like this:

  * Read JSON with list of stored disk configs

  * Iterate over actual devices a la libxl_device_disk_list
    * For each device, look for corresponding configuration in
      disk config.
      * If no such configuration, print a warning and make one up
        along the lines of libxl_device_disk_getinfo
      * If there was such a configuration, update the dynamically
        adjustable fields by copying them from xenstore:
         * currently, I think this is only the backing device
           info (which can be modified dynamically for cds at least)
    * Add resulting disk config to new list of disk configs

  * Replace stored list of disk configs with new one

The effect is that the pre-defaulted configuration takes precedence
but that it is safe to write a JSON configuration containing devices
which are about to be added.

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