Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions plugin/kvm/src/main/java/org/zstack/kvm/VolumeTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import org.zstack.core.db.Q;
import org.zstack.header.host.HostInventory;
import org.zstack.header.image.ImagePlatform;
import org.zstack.header.localVolumeCache.VmLocalVolumeCacheInventory;
import org.zstack.header.localVolumeCache.VmLocalVolumeCacheVO;
import org.zstack.header.localVolumeCache.VmLocalVolumeCacheVO_;
import org.zstack.header.storage.primary.PrimaryStorageVO;
import org.zstack.header.storage.primary.PrimaryStorageVO_;
import org.zstack.header.vm.VmInstanceVO;
Expand Down Expand Up @@ -158,16 +155,7 @@ public static VolumeTO valueOf(VolumeInventory vol, KVMHostInventory host, Strin
for (KVMConvertVolumeExtensionPoint ext : exts) {
to = ext.convertVolumeIfNeed(host, vol, to);
}
VmLocalVolumeCacheVO cacheVO = Q.New(VmLocalVolumeCacheVO.class)
.eq(VmLocalVolumeCacheVO_.volumeUuid, vol.getUuid())
.find();
if (cacheVO == null) {
return to;
}
VmLocalVolumeCacheInventory cacheInv = VmLocalVolumeCacheInventory.valueOf(cacheVO);
CacheTO cacheTO = CacheTO.valueOf(cacheInv);
to.setCache(cacheTO);
return to;
return to;
}

private synchronized static void prepareExts() {
Expand Down