Amador Pahim has uploaded a new change for review.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
hook: diskunmap: To include UNMAP support for disk and lun devices
This hook goes through VM definitions xml file and manipulate its disk device if it "disk" or "lun" and if the bus is "scsi" or "ide", adding "discard=unmap" option to "-drive" qemu command line patameter.
UNMAP support was added to qemu 1.5 and it's intendded to return the unused/freed blocks back to the storage, optimizing the utilizationi, specially useful for thin provisioned LUNs.
Result example:
<disk device="disk" snapshot="no" type="block"> ... <target bus="ide" dev="hda"/> ... <driver cache="none" discard="unmap" ... /> </disk> <disk device="lun" sgio="filtered" snapshot="no" type="block"> ... <target bus="scsi" dev="sda"/> ... <driver cache="none" discard="unmap" ... /> </disk>
Change-Id: I36385f1af24043755b3d4b6594bbe598b0d9518d Signed-off-by: Amador Pahim apahim@redhat.com --- M configure.ac M vdsm.spec.in M vdsm_hooks/Makefile.am A vdsm_hooks/diskunmap/Makefile.am A vdsm_hooks/diskunmap/README A vdsm_hooks/diskunmap/before_vm_start.py 6 files changed, 178 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/29770/1
diff --git a/configure.ac b/configure.ac index d741c1b..ce9d800 100644 --- a/configure.ac +++ b/configure.ac @@ -285,6 +285,7 @@ vdsm_hooks/Makefile vdsm_hooks/checkimages/Makefile vdsm_hooks/directlun/Makefile + vdsm_hooks/diskunmap/Makefile vdsm_hooks/ethtool_options/Makefile vdsm_hooks/extnet/Makefile vdsm_hooks/fakevmstats/Makefile diff --git a/vdsm.spec.in b/vdsm.spec.in index 2b67962..2c48e3e 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -366,6 +366,14 @@ VDSM hook used to perform consistency check on a qcow2 format disk image using the QEMU disk image utility.
+%package hook-diskunmap +Summary: Activate UNMAP for disk/lun devices +BuildArch: noarch +Requires: qemu-kvm >= 1.5 + +%description hook-diskunmap +VDSM hooks which allow to activate disk UNMAP. + %package hook-ethtool-options Summary: Allow setting custom ethtool options for vdsm controlled nics BuildArch: noarch @@ -1282,6 +1290,10 @@ %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun
+%files hook-diskunmap +%defattr(-, root, root, -) +%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_diskunmap + %files hook-fakevmstats %defattr(-, root, root, -) %{_libexecdir}/%{vdsm_name}/hooks/after_get_all_vm_stats/10_fakevmstats diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am index 5e4d731..20578db 100644 --- a/vdsm_hooks/Makefile.am +++ b/vdsm_hooks/Makefile.am @@ -27,6 +27,7 @@ SUBDIRS += \ checkimages \ directlun \ + diskunmap \ extnet \ fileinject \ fakevmstats \ diff --git a/vdsm_hooks/diskunmap/Makefile.am b/vdsm_hooks/diskunmap/Makefile.am new file mode 100644 index 0000000..f2b9a85 --- /dev/null +++ b/vdsm_hooks/diskunmap/Makefile.am @@ -0,0 +1,31 @@ +# +# Copyright 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# +# +EXTRA_DIST = \ + before_vm_start.py + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_vm_start + $(INSTALL_SCRIPT) $(srcdir)/before_vm_start.py \ + $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_diskunmap + +uninstall-local: + $(RM) $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_diskunmap + diff --git a/vdsm_hooks/diskunmap/README b/vdsm_hooks/diskunmap/README new file mode 100644 index 0000000..35751d6 --- /dev/null +++ b/vdsm_hooks/diskunmap/README @@ -0,0 +1,40 @@ +diskunmap vdsm hook: +================== +This hook goes through all of the VM's disks and manipulate its XML +file acccording to the input. This can be used to enable UNMAP feature +to discard unused blocks for better use of thin provisioned storage +devices. + +Syntax: + diskunmap=(off|on) + +Where: + 'on' is unmap enabled and off (default) is unmap disabled. + +Example: + diskunmap=on + +Installation: + - Use the engine-config to append the proper custom property: + $ sudo engine-config -s UserDefinedVMProperties='diskunmap=^(off|on)$' + - Verify that the macbind custom property was properly added: + $ sudo engine-config -g UserDefinedVMProperties + +Usage: + In the VM configuration window, open the custom properites tab, select + diskmap and select 'on', activating disk UNMAP for all disks and LUNs. + Only devices using IDE or VirtIO-SCSI interface will be affected. UNMAP is + not available for VirtIO interface. + +Expected Result: + For every DISK or LUN device, this configuration will include + "discard=unmap" to disk driver xml: + + <disk device="disk" snapshot="no" type="block"> + ... + <driver cache="none" discard="unmap" ... /> + </disk> + + This option will be tranlated to qemu as bellow: + + ... -drive file=<file>,discard=unmap,... diff --git a/vdsm_hooks/diskunmap/before_vm_start.py b/vdsm_hooks/diskunmap/before_vm_start.py new file mode 100644 index 0000000..2fc0b81 --- /dev/null +++ b/vdsm_hooks/diskunmap/before_vm_start.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python2 +# +# Copyright 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + + +''' +Hook to enable disk UNMAP for disk devices. + +Syntax: + diskunmap=(off|on) + +Example: + diskunmap=on +''' + +import os +import sys +import traceback +from xml.dom import minidom + +import hooking + + +def addDiscardUnmap(domxml): + for disk in domxml.getElementsByTagName('disk'): + device = disk.getAttribute('device') + target = disk.getElementsByTagName('target')[0] + bus = target.getAttribute('bus') + if ((device == 'disk' or device == 'lun') + and (bus == 'scsi' or bus == 'ide')): + driver = disk.getElementsByTagName('driver')[0] + driver.setAttribute('discard', 'unmap') + + +def main(): + if 'diskunmap' in os.environ: + unmapConfig = os.environ['diskunmap'] + domxml = hooking.read_domxml() + if unmapConfig == 'on': + addDiscardUnmap(domxml) + hooking.write_domxml(domxml) + + +def test(): + text = '''<disk device="disk" snapshot="no" type="block"> +<address bus="0" controller="0" target="0" type="drive" unit="0"/> +<source dev="/rhev/data-center/mnt/blockSD/ +b4cf7d74-6a07-4138-9d4f-80b14c3acefd/images/ +1580607a-b240-4199-99ac-3d2162934ba6/e5ba276f-dcba-4582-b13f-c165afa2f575"/> +<target bus="ide" dev="hda"/> +<serial>1580607a-b240-4199-99ac-3d2162934ba6</serial> +<driver cache="none" error_policy="stop" io="native" +name="qemu" type="raw"/> +</disk>''' + + xmldom = minidom.parseString(text) + + disk = xmldom.getElementsByTagName('disk')[0] + print "\nDisk device definition before execution: \n%s"\ + % disk.toxml(encoding='UTF-8') + + addDiscardUnmap(xmldom) + + print "\nDisk device after setting discard attribute: \n%s"\ + % disk.toxml(encoding='UTF-8') + + +if __name__ == '__main__': + try: + if '--test' in sys.argv: + test() + else: + main() + except: + hooking.exit_hook(' diskunmap hook: [unexpected error]: %s\n' % + traceback.format_exc())
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 1: Verified+1
Michal Skrivanek has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 2: Code-Review+1
just a "at glance" type of review. few comments/questions in patchest 1
Michal Skrivanek has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 2:
oh, and proper storage teams' review required too - I added Federico
oVirt Jenkins CI Server has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10102/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10887/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/90/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/122... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/101/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11044/ : SUCCESS
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 3: -Verified
Ok, let me clean the reviews by sending a new patch set. PS 2 and 3 changed only the commit message and seems like the reviews are kept. Please post your comments on the next PS4.
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 4: Verified+1
Gerrit seems ok now.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10103/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10888/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/91/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/123... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/102/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11045/ : SUCCESS
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 4:
Build error not related to the patch:
./lib/vdsm/netinfo.py:839:18: E121 continuation line indentation is not a multiple of four
oVirt Jenkins CI Server has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10104/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10889/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/92/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/124... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/103/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11046/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10105/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10890/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/93/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/125... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/104/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11047/ : SUCCESS
Michal Skrivanek has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 4:
(3 comments)
updated comments
http://gerrit.ovirt.org/#/c/29770/4/vdsm.spec.in File vdsm.spec.in:
Line 368: Line 369: %package hook-diskunmap Line 370: Summary: Activate UNMAP for disk/lun devices Line 371: BuildArch: noarch Line 372: Requires: qemu-kvm >= 1.5 so no intention for EL 6 support? Line 373: Line 374: %description hook-diskunmap Line 375: VDSM hooks which allow to activate disk UNMAP. Line 376:
http://gerrit.ovirt.org/#/c/29770/4/vdsm_hooks/diskunmap/README File vdsm_hooks/diskunmap/README:
Line 34: ... Line 35: <driver cache="none" discard="unmap" ... /> Line 36: </disk> Line 37: Line 38: This option will be tranlated to qemu as bellow: *translated Line 39:
http://gerrit.ovirt.org/#/c/29770/4/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 84: Line 85: if __name__ == '__main__': Line 86: try: Line 87: if '--test' in sys.argv: Line 88: test() I like the idea of test…but maybe less changes if you do it in main()? Line 89: else: Line 90: main() Line 91: except: Line 92: hooking.exit_hook(' diskunmap hook: [unexpected error]: %s\n' %
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 4: -Verified
(3 comments)
Thank you for the review. A new patch set is on the way.
http://gerrit.ovirt.org/#/c/29770/4/vdsm.spec.in File vdsm.spec.in:
Line 368: Line 369: %package hook-diskunmap Line 370: Summary: Activate UNMAP for disk/lun devices Line 371: BuildArch: noarch Line 372: Requires: qemu-kvm >= 1.5
so no intention for EL 6 support?
discard support was introduced by qemu 1.5 and it was not backported to el6 so far. As soon as I see discard in downstream, I send a new patch to require the proper version also in downstream. Line 373: Line 374: %description hook-diskunmap Line 375: VDSM hooks which allow to activate disk UNMAP. Line 376:
http://gerrit.ovirt.org/#/c/29770/4/vdsm_hooks/diskunmap/README File vdsm_hooks/diskunmap/README:
Line 34: ... Line 35: <driver cache="none" discard="unmap" ... /> Line 36: </disk> Line 37: Line 38: This option will be tranlated to qemu as bellow:
*translated
Done Line 39:
http://gerrit.ovirt.org/#/c/29770/4/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 84: Line 85: if __name__ == '__main__': Line 86: try: Line 87: if '--test' in sys.argv: Line 88: test()
I like the idea of test…but maybe less changes if you do it in main()?
Hmm... I like the current way, keeping the test apart. test() is not supposed to have 'diskunmap' in os.environ, so the scope is out of main() primary intention. Line 89: else: Line 90: main() Line 91: except: Line 92: hooking.exit_hook(' diskunmap hook: [unexpected error]: %s\n' %
oVirt Jenkins CI Server has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 5:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10311/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11096/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/120... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/151... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/130/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11253/ : FAILURE
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 5: Verified+1
Francesco Romani has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 5:
preliminary ack
Fabian Deutsch has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 5: Code-Review+1
automation@ovirt.org has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 6: Code-Review+1
nice addition
automation@ovirt.org has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Dan Kenigsberg has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7:
(1 comment)
https://gerrit.ovirt.org/#/c/29770/7/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 43: device = disk.getAttribute('device') Line 44: target = disk.getElementsByTagName('target')[0] Line 45: bus = target.getAttribute('bus') Line 46: if ((device == 'disk' or device == 'lun') Line 47: and (bus == 'scsi' or bus == 'ide')): Why not virtio? Line 48: driver = disk.getElementsByTagName('driver')[0] Line 49: driver.setAttribute('discard', 'unmap') Line 50: Line 51:
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7:
(1 comment)
https://gerrit.ovirt.org/#/c/29770/7/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 43: device = disk.getAttribute('device') Line 44: target = disk.getElementsByTagName('target')[0] Line 45: bus = target.getAttribute('bus') Line 46: if ((device == 'disk' or device == 'lun') Line 47: and (bus == 'scsi' or bus == 'ide')):
Why not virtio?
virtio does not support discard. Only IDE and virtio-scsi do. Line 48: driver = disk.getElementsByTagName('driver')[0] Line 49: driver.setAttribute('discard', 'unmap') Line 50: Line 51:
Michal Skrivanek has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7: Code-Review+2
(1 comment)
raising score
https://gerrit.ovirt.org/#/c/29770/7/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 43: device = disk.getAttribute('device') Line 44: target = disk.getElementsByTagName('target')[0] Line 45: bus = target.getAttribute('bus') Line 46: if ((device == 'disk' or device == 'lun') Line 47: and (bus == 'scsi' or bus == 'ide')):
virtio does not support discard. Only IDE and virtio-scsi do.
can you point me to the documentation regarding why is it so? Line 48: driver = disk.getElementsByTagName('driver')[0] Line 49: driver.setAttribute('discard', 'unmap') Line 50: Line 51:
Dan Kenigsberg has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7: Continuous-Integration+1
Dan Kenigsberg has submitted this change and it was merged.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
hook: diskunmap: To include UNMAP support for disk and lun devices
This hook goes through VM definitions xml file and manipulate its disk device if it "disk" or "lun" and if the bus is "scsi" or "ide", adding "discard=unmap" option to "-drive" qemu command line patameter.
UNMAP support was introduced by qemu 1.5 and it's intended to return the unused/freed blocks back to the storage, specially useful for thin provisioned LUNs.
Result example:
<disk device="disk" snapshot="no" type="block"> ... <target bus="ide" dev="hda"/> ... <driver cache="none" discard="unmap" ... /> </disk> <disk device="lun" sgio="filtered" snapshot="no" type="block"> ... <target bus="scsi" dev="sda"/> ... <driver cache="none" discard="unmap" ... /> </disk>
Change-Id: I36385f1af24043755b3d4b6594bbe598b0d9518d Signed-off-by: Amador Pahim apahim@redhat.com Reviewed-on: https://gerrit.ovirt.org/29770 Reviewed-by: Fabian Deutsch fabiand@redhat.com Reviewed-by: Francesco Romani fromani@redhat.com Reviewed-by: Michal Skrivanek michal.skrivanek@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com Continuous-Integration: Dan Kenigsberg danken@redhat.com --- M configure.ac M vdsm.spec.in M vdsm_hooks/Makefile.am A vdsm_hooks/diskunmap/Makefile.am A vdsm_hooks/diskunmap/README A vdsm_hooks/diskunmap/before_vm_start.py 6 files changed, 178 insertions(+), 0 deletions(-)
Approvals: Fabian Deutsch: Looks good to me, but someone else must approve Amador Pahim: Verified Dan Kenigsberg: Looks good to me, approved; Passed CI tests Francesco Romani: Looks good to me, but someone else must approve Michal Skrivanek: Looks good to me, but someone else must approve
automation@ovirt.org has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 8:
* Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
Amador Pahim has posted comments on this change.
Change subject: hook: diskunmap: To include UNMAP support for disk and lun devices ......................................................................
Patch Set 7:
(1 comment)
https://gerrit.ovirt.org/#/c/29770/7/vdsm_hooks/diskunmap/before_vm_start.py File vdsm_hooks/diskunmap/before_vm_start.py:
Line 43: device = disk.getAttribute('device') Line 44: target = disk.getElementsByTagName('target')[0] Line 45: bus = target.getAttribute('bus') Line 46: if ((device == 'disk' or device == 'lun') Line 47: and (bus == 'scsi' or bus == 'ide')):
can you point me to the documentation regarding why is it so?
http://wiki.qemu.org/ChangeLog/1.5#Block_devices
http://lists.gnu.org/archive/html/qemu-discuss/2014-10/msg00003.html Line 48: driver = disk.getElementsByTagName('driver')[0] Line 49: driver.setAttribute('discard', 'unmap') Line 50: Line 51:
vdsm-patches@lists.fedorahosted.org