Use the new loop backstore type for fileio

Use the new loop backstore type when mapping fileio volumes. The
compute node will mount the file as a loop device and map that to
the VM.
This is to increase performance.

Change-Id: Ic75890265aa033e906bc038dabc55cf36cfc547e
This commit is contained in:
Taylor Jakobson 2018-05-14 15:53:40 -05:00
parent 0036c9984e
commit b86a9480c3
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ class TestFileIOVolumeAdapter(test_vol.TestVolumeAdapter):
# Validate
mock_file_bld.assert_called_once_with(
self.adpt, 'fake_path',
backstore_type=pvm_stg.BackStoreType.FILE_IO, tag='a_vol_id')
backstore_type=pvm_stg.BackStoreType.LOOP, tag='a_vol_id')
self.assertEqual(1, mock_build_map.call_count)
self.assertEqual(1, mock_udid_to_map.call_count)
@ -130,7 +130,7 @@ class TestFileIOVolumeAdapter(test_vol.TestVolumeAdapter):
# Validate
mock_file_bld.assert_called_once_with(
self.adpt, 'fake_path',
backstore_type=pvm_stg.BackStoreType.FILE_IO, tag='a_vol_id')
backstore_type=pvm_stg.BackStoreType.LOOP, tag='a_vol_id')
self.assertEqual(0, mock_build_map.call_count)
@mock.patch('pypowervm.tasks.partition.get_mgmt_partition', autospec=True)

View File

@ -97,7 +97,7 @@ class FileIOVolumeAdapter(v_driver.PowerVMVolumeAdapter):
volid = self.connection_info['data']['volume_id']
fio = pvm_stg.FileIO.bld(
self.adapter, path,
backstore_type=pvm_stg.BackStoreType.FILE_IO, tag=volid)
backstore_type=pvm_stg.BackStoreType.LOOP, tag=volid)
def add_func(vios_w):
# If the vios doesn't match, just return