Liron Ar has uploaded a new change for review.

Change subject: core: snapshot disks should be part of the vm disk map only.
......................................................................

core: snapshot disks should be part of the vm disk map only.

Currently the vm populated DiskList should contain only it's actual
image disks.
The vm attached snapshot disks should be threated as lun/shareable
disks.

Regardless to this change, it needs to be inspected if we want to
perform the filtering of the disks when loading it from the db or by
using ImagesHandler.filterImageDisks, as currently in many flows the
filtering is done although VM.getDiskList() contains only the needed
disks - therefore in this change i fixed only this part.

Change-Id: I5d18e5d3e321b871f4c7c283c8950fa7645eed5c
Signed-off-by: Liron Aravot <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/20818/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
index 6ae4958..3bba631 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
@@ -254,7 +254,7 @@
 
     public static void updateDisksForVm(VM vm, Collection<? extends Disk> 
disks) {
         for (Disk disk : disks) {
-            if (disk.isAllowSnapshot()) {
+            if (disk.isAllowSnapshot() && !disk.isDiskSnapshot()) {
                 DiskImage image = (DiskImage) disk;
                 vm.getDiskMap().put(image.getId(), image);
                 vm.getDiskList().add(image);


-- 
To view, visit http://gerrit.ovirt.org/20818
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d18e5d3e321b871f4c7c283c8950fa7645eed5c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to