Change in ovirt-engine[master]: core: introduce Pass Discard support for vm disks

Code Review gerrit at ovirt.org
Sun Nov 27 15:18:05 UTC 2016


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: core: introduce Pass Discard support for vm disks
......................................................................


core: introduce Pass Discard support for vm disks

This patch adds the backend support for a new vm disk property - "Pass
Discard".

Passing discard can be set for a vm disk image on file and block storage
domains or for a vm direct lun, with an IDE or VirtIO-SCSI interface.
When Pass discard is enabled, if a discard command (UNMAP SCSI command)
is sent from the guest, the vm will not ignore it and will pass it on to
the underlying storage.

By enabling the Pass Discard property for a vm disk, thin provisioned
luns in the underlying storage that are used as direct luns or that are
used to create a block storage domain can not only grow, but also can
shrink. With that, unused space can be "returned" to the storage
(recycled) and be used by someone else.

Change-Id: Iec84aeddbe7f088e989b4d9dbaadec9364671971
Bug-Url: https://bugzilla.redhat.com/1241106
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AbstractDiskVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AttachDiskToVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/DiskHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/HotPlugDiskToVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/MoveOrCopyDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/ExtendSANStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommand.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/utils/BlockStorageDiscardFunctionalityHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/DiskVmElementValidator.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/MultipleDiskVmElementValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmTemplateCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/AttachDiskToVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/HotPlugDiskToVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/MoveOrCopyDiskCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/ExtendSANStorageDomainCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/SyncLunsInfoForBlockStorageDomainCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommandTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/utils/BlockStorageDiscardFunctionalityHelperTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/RunVmValidatorTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/DiskVmElementDiscardSupportValidatorTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/MultipleDiskVmElementValidatorTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskVmElement.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/HotPlugDiskVDSParameters.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskVmElementDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskVmElementDaoImpl.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DiskVmElementDaoTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskAttachmentMapper.java
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/VmInfoBuilderImpl.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M packaging/dbscripts/disk_vm_element_sp.sql
A packaging/dbscripts/upgrade/04_01_0520_add_pass_discard_column_to_vm_element_table.sql
54 files changed, 1,659 insertions(+), 30 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Idan Shaby: Verified



-- 
To view, visit https://gerrit.ovirt.org/61897
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec84aeddbe7f088e989b4d9dbaadec9364671971
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby 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