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

Re: [libvirt] [PATCH 4/6] conf: Parse and format the new XML



On 01/02/2013 07:37 AM, Osier Yang wrote:
> Like "rawio", "sgio" is only allowed for block disk of device
> type "lun".
> 
> It doesn't default disk->sgio to "filtered" when parsing, as
> it won't be able to distinguish explicitly requested "filtered"
> and a default "filtered" in driver then. We have to error out for
> explicit request when the kernel doesn't support the new sysfs
> knob "unpriv_sgio", however, for defaulted "filtered", we can
> just ignore it if the kernel doesn't support "unpriv_sgio".
> ---
>  src/conf/domain_conf.c                             |   55 +++++++++++++++-----
>  src/conf/domain_conf.h                             |   10 ++++
>  ...qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml |   32 +++++++++++
>  tests/qemuxml2xmltest.c                            |    1 +
>  4 files changed, 85 insertions(+), 13 deletions(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml
> 

> +enum virDomainDiskSGIO {
> +    VIR_DOMAIN_DISK_SGIO_DEFAULT = 0,
> +    VIR_DOMAIN_DISK_SGIO_FILTERED,
> +    VIR_DOMAIN_DISK_SGIO_UNFILTERED,
> +
> +    VIR_DOMAIN_DISK_SGIO_LAST
> +};
> +
>  typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo;
>  struct _virDomainBlockIoTuneInfo {
>      unsigned long long total_bytes_sec;
> @@ -638,6 +646,7 @@ struct _virDomainDiskDef {
>      virStorageEncryptionPtr encryption;
>      bool rawio_specified;
>      int rawio; /* no = 0, yes = 1 */

Don't know why we didn't make this 'bool', but that's pre-existing and
would be a separate cleanup patch.

> +    int sgio;

I'd add /* enum virDomainDiskSGIO */, to make it easier to see what goes
in this int.

ACK.

-- 
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]