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

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

 



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?

> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index ff50214..20b3f5a 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -2798,6 +2798,11 @@
>          between domains (assuming the hypervisor and OS support this).
>          Only supported by SCSI host device.
>          <span class="since">Since 1.0.6</span>
> +        <p>
> +          Note: Although <code>shareable</code> was introduced
> +          <span class="since">in 1.0.6</span>, but it did not work as

s/but //


> +++ b/src/util/virscsi.c
> @@ -1,6 +1,7 @@
>  /*
>   * virscsi.c: helper APIs for managing host SCSI devices
>   *
> + * Copyright (C) 2013 - 2014 Red Hat, Inc.

s/ - /-/

At any rate, the changes look reasonable to me; ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]