Skip to content

Commit bb20efa

Browse files
author
haidong.pang
committed
<fix>[vm_local_volume_cache]: Set CacheTO in extension point
Enable cache for an in-use volume omits some command fields sent to the agent. VmLocalVolumeCacheManagerImpl implements the convertVolumeIfNeed method of KVMConvertVolumeExtensionPoint. CacheTO should be set in the implementation of this extension point. Resolves: ZSTAC-83649 Change-Id: I69757864676978787767736a6f777a7562636b75
1 parent 62de5fa commit bb20efa

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

plugin/kvm/src/main/java/org/zstack/kvm/VolumeTO.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,6 @@ public static VolumeTO valueOf(VolumeInventory vol, KVMHostInventory host, Strin
158158
for (KVMConvertVolumeExtensionPoint ext : exts) {
159159
to = ext.convertVolumeIfNeed(host, vol, to);
160160
}
161-
VmLocalVolumeCacheVO cacheVO = Q.New(VmLocalVolumeCacheVO.class)
162-
.eq(VmLocalVolumeCacheVO_.volumeUuid, vol.getUuid())
163-
.find();
164-
if (cacheVO == null) {
165-
return to;
166-
}
167-
VmLocalVolumeCacheInventory cacheInv = VmLocalVolumeCacheInventory.valueOf(cacheVO);
168-
CacheTO cacheTO = CacheTO.valueOf(cacheInv);
169-
to.setCache(cacheTO);
170161
return to;
171162
}
172163

0 commit comments

Comments
 (0)