Change in ovirt-engine[master]: merge: validate available space before merge
Code Review
gerrit at ovirt.org
Tue May 9 08:52:00 UTC 2017
>From Allon Mureinik <amureini at redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: merge: validate available space before merge
......................................................................
merge: validate available space before merge
Introducing StorageDomainValidator#hasSpaceForMerge method for
calculating required space when performing live/cold merge.
The calculation is performed adhering to these rules when performing new
(4.1+) merge operation:
| File Domain | Block Domain
-----|--------------------------------------------------|--------------
qcow | min(virtual_size(top) * 1.1 - actual_size(base), |
| actual_size(top)) | same as file
-----|--------------------------------------------------|--------------
raw | min(virtual_size(top) / 1.1, |
| virtual_size(base) - actual_size(base)) | 0
| |
* The qcow/raw refers to the base snapshot format
* base/top - base snapshot/ top snapshot
* 1.1 - qcow2 overhead
This is made for both live and cold merge 4.1+. If we are performing
cold merge pre-4.1, we take min(actual(base) + actual(top),
virtual(top))
Change-Id: Ib0f41199708593b2df671e1f0132ae813c2e996d
Bug-Url: https://bugzilla.redhat.com/1414472
Signed-off-by: Benny Zlotnik <bzlotnik at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/MultipleStorageDomainsValidator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/MultipleStorageDomainsValidatorTest.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskImageDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskImageDaoImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DiskImageDaoTest.java
M packaging/dbscripts/disk_images_sp.sql
9 files changed, 214 insertions(+), 14 deletions(-)
Approvals:
Benny Zlotnik: Verified
Jenkins CI: Passed CI tests
Allon Mureinik: Looks good to me, approved
Ala Hino: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75096
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0f41199708593b2df671e1f0132ae813c2e996d
Gerrit-PatchSet: 42
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Benny Zlotnik <bzlotnik at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list