[libvirt] [PATCH 1/2] qemu: Don't fail if the SCSI host device is shareable between domains

Osier Yang jyang at redhat.com
Thu Jan 30 06:54:45 UTC 2014

On 30/01/14 03:31, Eric Blake wrote:
> On 01/29/2014 10:22 AM, Osier Yang wrote:
>> It doesn't make sense to fail if the SCSI host device is specified
>> as "shareable" explicitly between domains (NB, it works if and only
>> if the device is specified as "shareable" for *all* domains,
>> otherwise it fails).
>> To fix the problem, this patch introduces an array for virSCSIDevice
>> struct, which records all the names of domain which are using the
>> device (note that the recorded domains must specifiy the device as
> s/specifiy/specify/
>> shareable).  And the change on the data struct brings on many
>> subsequent changes in the code.
>> Since prior to this patch, the "shareable" tag didn't work as expected,
>> it actually work like "non-shareable".  If there was a live domain using
>> the SCSI device with "shareable" specified, then after upgrading
>> (assuming the live domain keep running during upgrading) the older
>> libvirt (without this patch) to newer libvirt (with this patch), it may
>> cause some confusion when user tries to start later domains as
>> "shareable". So this patch also added notes in formatdomain.html to
>> declare the fact.
> I'm not sure I follow what you're trying to warn about here - when you
> upgrade libvirtd, doesn't the state reloading figure out which domains
> have a device in use, as part of the reload machinery?  That is, while
> the old code mishandled shareable with regards to which domain is using
> the device, we don't actually store the array of domains using a device
> in XML, but recompute it on libvirtd restart.  Thus, upgrading to a
> newer libvirtd (whether release 1.2.2 or to a version with this patch
> backported), then starting yet another guest with a shareable request,
> should work correctly, right?

I think both John and I were confused and forgot upgrading will triger
configuration reloading.  :-)

Will reword the commit log a bit when pushing.  Thanks.


More information about the libvir-list mailing list