Re: [PATCH 1/1] add support for iSER block type.

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

 



On Wed, Dec 13, 2017 at 17:37:42 +0800, Charles Kelimod wrote:
> I can add protocol type. For driver name, I considered that before, for
> qemu, its actually use same driver for iSCSI and iSER, but there defined a
> driver called "iser":
> static BlockDriver bdrv_iser = {
> .format_name = "iser",
> .protocol_name = "iser", to use iser in qemu, we need to set driver as
> "iser" and transport as "iser" as well. I think it should be "iscsi" and
> "rdma", I have discussed with qemu members, they said don't need to modify
> in qemu. Maybe for future consideration, there might be a stand along
> driver for iser.

Then that probably is a bug in qemu. The QMP schema does not have driver
name 'iser' at any point:

this is from qemu.git/qmp/block-core.json

##
# @BlockdevOptionsGluster:
#
# Driver specific block device options for Gluster
#
# @volume:      name of gluster volume where VM image resides
#
# @path:        absolute path to image file in gluster volume
#
# @server:      gluster servers description
#
# @debug:       libgfapi log level (default '4' which is Error)
#               (Since 2.8)
#
# @logfile:     libgfapi log file (default /dev/stderr) (Since 2.8)
#
# Since: 2.9
##
{ 'struct': 'BlockdevOptionsGluster',
  'data': { 'volume': 'str',
            'path': 'str',
            'server': ['SocketAddress'],
            '*debug': 'int',
            '*logfile': 'str' } }

##
# @IscsiTransport:
#
# An enumeration of libiscsi transport types
#
# Since: 2.9
##
{ 'enum': 'IscsiTransport',
  'data': [ 'tcp', 'iser' ] }

##
# @BlockdevOptions:
#
# Options for creating a block device.  Many options are available for all
# block devices, independent of the block driver:
#
# @driver:        block driver name
# @node-name:     the node name of the new node (Since 2.0).
#                 This option is required on the top level of blockdev-add.
# @discard:       discard-related options (default: ignore)
# @cache:         cache-related options
# @read-only:     whether the block device should be read-only
#                 (default: false)
# @detect-zeroes: detect and optimize zero writes (Since 2.1)
#                 (default: off)
# @force-share:   force share all permission on added nodes.
#                 Requires read-only=true. (Since 2.10)
#
# Remaining options are determined by the block driver.
#
# Since: 2.9
##
{ 'union': 'BlockdevOptions',
  'base': { 'driver': 'BlockdevDriver',
            '*node-name': 'str',
            '*discard': 'BlockdevDiscardOptions',
            '*cache': 'BlockdevCacheOptions',
            '*read-only': 'bool',
            '*force-share': 'bool',
            '*detect-zeroes': 'BlockdevDetectZeroesOptions' },
  'discriminator': 'driver',
  'data': {
      'blkdebug':   'BlockdevOptionsBlkdebug',
      'blkverify':  'BlockdevOptionsBlkverify',
      'bochs':      'BlockdevOptionsGenericFormat',
      'cloop':      'BlockdevOptionsGenericFormat',
      'dmg':        'BlockdevOptionsGenericFormat',
      'file':       'BlockdevOptionsFile',
      'ftp':        'BlockdevOptionsCurlFtp',
      'ftps':       'BlockdevOptionsCurlFtps',
      'gluster':    'BlockdevOptionsGluster',
      'host_cdrom': 'BlockdevOptionsFile',
      'host_device':'BlockdevOptionsFile',
      'http':       'BlockdevOptionsCurlHttp',
      'https':      'BlockdevOptionsCurlHttps',
      'iscsi':      'BlockdevOptionsIscsi',
      'luks':       'BlockdevOptionsLUKS',
      'nbd':        'BlockdevOptionsNbd',
      'nfs':        'BlockdevOptionsNfs',
      'null-aio':   'BlockdevOptionsNull',
      'null-co':    'BlockdevOptionsNull',
      'parallels':  'BlockdevOptionsGenericFormat',
      'qcow2':      'BlockdevOptionsQcow2',
      'qcow':       'BlockdevOptionsQcow',
      'qed':        'BlockdevOptionsGenericCOWFormat',
      'quorum':     'BlockdevOptionsQuorum',
      'raw':        'BlockdevOptionsRaw',
      'rbd':        'BlockdevOptionsRbd',
      'replication':'BlockdevOptionsReplication',
      'sheepdog':   'BlockdevOptionsSheepdog',
      'ssh':        'BlockdevOptionsSsh',
      'throttle':   'BlockdevOptionsThrottle',
      'vdi':        'BlockdevOptionsGenericFormat',
      'vhdx':       'BlockdevOptionsGenericFormat',
      'vmdk':       'BlockdevOptionsGenericCOWFormat',
      'vpc':        'BlockdevOptionsGenericFormat',
      'vvfat':      'BlockdevOptionsVVFAT',
      'vxhs':       'BlockdevOptionsVxHS'
  } }

As you can see, iser is not a protocol name thus should not be treated
in libvirt differently.

The schema is also the same as when called through query-qmp-schema.

If this really is the case, please fix qemu first. You'll then need a
capability check that will allow to use this new thing only when the
fixed qemu is detected.

Either way, schema or code need to be fixed.

Attachment: signature.asc
Description: PGP 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]
  Powered by Linux