Change in ovirt-engine[master]: core: improve post zero check

ofrenkel at redhat.com ofrenkel at redhat.com
Thu Jul 18 09:19:26 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: core: improve post zero check
......................................................................


core: improve post zero check

This patch improves the check whether to use post zero or not when
removing memory state images using MemoryImageRemover class: instead of
filtering the list of disks to get all the disks which are marked with
"wipe after delete" and then check if the list is not empty, we check
whether one of the disks in the list is marked with "wipe after delete".

This change has several benefits:
1. we don't have to go over all the items in the list everytime (only in
the worst case, if no such disk exists in the list)
2. we don't need to create new list
3. the code is shorter and is more intuitive

Change-Id: Id78a5b74748f5c174fd0fba70c95c40b66ff247f
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemover.java
1 file changed, 6 insertions(+), 10 deletions(-)

Approvals:
  Omer Frenkel: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id78a5b74748f5c174fd0fba70c95c40b66ff247f
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list