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

Re: [libvirt] [PATCH 7/8 v8] qemu: Set unpriv_sgio when attaching disk



On 12/14/2012 08:45 AM, Osier Yang wrote:
> Just like for domain starting, this sets the disk's unpriv_sgio
> if cdbfilter is specified when attaching disk.
> ---
>  src/qemu/qemu_driver.c |   23 +++++++++++++++++------
>  1 files changed, 17 insertions(+), 6 deletions(-)

> +
> +        /* Set sysfs unpriv_sgio if cdbfilter is specified. */
> +        if (disk->cdbfilter) {
> +            if (virSetDeviceUnprivSGIO(disk->src, NULL,
> +                                       (disk->cdbfilter ==
> +                                       VIR_DOMAIN_DISK_CDB_FILTER_NO)
> +                                       ? 1 : 0) < 0) {
> +                VIR_WARN("Failed to set unpriv_sgio of disk '%s'", disk->src);
> +                goto end;
> +            }
> +        }

Again, does this do the right thing if some other domain already had
cdbfilter='no' (aka kernel allows SG_IO) but this domain omitted the
cdbfilter attribute (which defaults to cdbfilter='yes' but does not
satisfy the if(disk->cdbfilter) condition)?  I suspect that will be
worked out when you rework things to use a tri-state rawio.

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

Attachment: signature.asc
Description: OpenPGP digital signature


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