Re: [PATCH v2 4/5] qemu: Process the hostdev "rawio" setting

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

 



On 09/19/2014 12:17 PM, John Ferlan wrote:
> Mimic the "Disk" processing for 'rawio', but for a scsi_host hostdev
> lun device.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c  | 18 ++++++++++++++++++
>  src/qemu/qemu_domain.h  |  4 ++++
>  src/qemu/qemu_driver.c  |  1 +
>  src/qemu/qemu_process.c | 19 +++++++++++++++++++
>  4 files changed, 42 insertions(+)
> 

> @@ -4376,6 +4378,23 @@ int qemuProcessStart(virConnectPtr conn,
>              goto cleanup;
>      }
>  
> +    /* If rawio not already set, check hostdevs as well */
> +    if (!rawio_set) {
> +        for (i = 0; i < vm->def->nhostdevs; i++) {
> +            virDomainHostdevSubsysSCSIPtr scsisrc =
> +                &vm->def->hostdevs[i]->source.subsys.u.scsi;
> +            if (scsisrc->rawio == VIR_TRISTATE_BOOL_YES) {
> +#ifdef CAP_SYS_RAWIO
> +                virCommandAllowCap(cmd, CAP_SYS_RAWIO);

You can break; here.

> +#else
> +                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                               _("Raw I/O is not supported on this platform"));
> +                goto cleanup;
> +#endif
> +            }
> +        }
> +    }
> +
>      virCommandSetPreExecHook(cmd, qemuProcessHook, &hookData);
>      virCommandSetMaxProcesses(cmd, cfg->maxProcesses);
>      virCommandSetMaxFiles(cmd, cfg->maxFiles);
> 

Jan

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]