libvirt: use native AIO mode for StorPool Cinder volumes.
This is in keeping with the "Libvirt: AIO mode for disk devices" spec (https://blueprints.launchpad.net/nova/+spec/libvirt-aio-mode), which was accepted for Mitaka and implemented for several drivers (iSCSI, FC, NFS et al) since then. Change-Id: I814f26480f33839d09b24d4bc36b4f46e1a06e36
This commit is contained in:
parent
e3a55493ba
commit
8f4f8c833a
|
@ -1,4 +1,4 @@
|
|||
# (c) Copyright 2015 - 2018 StorPool
|
||||
# (c) Copyright 2015 - 2019 StorPool
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -119,6 +119,7 @@ class LibvirtStorPoolVolumeDriverTestCase(
|
|||
c = libvirt_driver.get_config(ci, self.disk_info)
|
||||
self.assertEqual('block', c.source_type)
|
||||
self.assertEqual('/dev/storpool/something', c.source_path)
|
||||
self.assertEqual('native', c.driver_io)
|
||||
|
||||
@mock_storpool
|
||||
def test_storpool_attach_detach_extend(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# (c) Copyright 2015 - 2018 StorPool
|
||||
# (c) Copyright 2015 - 2019 StorPool
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -32,6 +32,13 @@ class LibvirtStorPoolVolumeDriver(libvirt_volume.LibvirtVolumeDriver):
|
|||
self.connector = connector.InitiatorConnector.factory(
|
||||
initiator.STORPOOL, utils.get_root_helper())
|
||||
|
||||
def get_config(self, connection_info, disk_info):
|
||||
"""Returns xml for libvirt."""
|
||||
conf = super(LibvirtStorPoolVolumeDriver,
|
||||
self).get_config(connection_info, disk_info)
|
||||
conf.driver_io = "native"
|
||||
return conf
|
||||
|
||||
def connect_volume(self, connection_info, instance):
|
||||
LOG.debug("Attaching StorPool volume %s",
|
||||
connection_info['data']['volume'], instance=instance)
|
||||
|
|
Loading…
Reference in New Issue