Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 890154 Details for
Bug 1091516
RFE: enable underlying QEMU discard support in virt-install
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
example patch to implement requested functionality
discard.patch (text/plain), 2.93 KB, created by
Jim Minter
on 2014-04-27 07:12:54 UTC
(
hide
)
Description:
example patch to implement requested functionality
Filename:
MIME Type:
Creator:
Jim Minter
Created:
2014-04-27 07:12:54 UTC
Size:
2.93 KB
patch
obsolete
>diff --git a/man/virt-install.pod b/man/virt-install.pod >index 38e7a00..4ea1079 100644 >--- a/man/virt-install.pod >+++ b/man/virt-install.pod >@@ -573,6 +573,13 @@ The cache value can be 'none', 'writethrough', or 'writeback'. > 'writethrough' provides read caching. 'writeback' provides > read and write caching. > >+=item B<discard> >+ >+Whether discard (also known as "trim" or "unmap") requests are ignored >+or passed to the filesystem. The value can be either "unmap" (allow >+the discard request to be passed) or "ignore" (ignore the discard >+request). Since 1.0.6 (QEMU and KVM only) >+ > =item B<format> > > Disk image format. For file volumes, this can be 'raw', 'qcow2', 'vmdk', etc. See format types in L<http://libvirt.org/storage.html> for possible values. This is often mapped to the B<driver_type> value as well. >diff --git a/virtinst/cli.py b/virtinst/cli.py >index 2425dc6..9954fb0 100644 >--- a/virtinst/cli.py >+++ b/virtinst/cli.py >@@ -1638,6 +1638,7 @@ class ParserDisk(VirtCLIParser): > self.set_param("bus", "bus") > self.set_param("removable", "removable", is_onoff=True) > self.set_param("driver_cache", "cache") >+ self.set_param("driver_discard", "discard") > self.set_param("driver_name", "driver_name") > self.set_param("driver_type", "driver_type") > self.set_param("driver_io", "io") >diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py >index 2d692f1..49ec371 100644 >--- a/virtinst/devicedisk.py >+++ b/virtinst/devicedisk.py >@@ -169,6 +169,10 @@ class VirtualDisk(VirtualDevice): > cache_types = [CACHE_MODE_NONE, CACHE_MODE_WRITETHROUGH, > CACHE_MODE_WRITEBACK, CACHE_MODE_DIRECTSYNC, CACHE_MODE_UNSAFE] > >+ DISCARD_MODE_IGNORE = "ignore" >+ DISCARD_MODE_UNMAP = "unmap" >+ discard_types = [DISCARD_MODE_IGNORE, DISCARD_MODE_UNMAP] >+ > DEVICE_DISK = "disk" > DEVICE_LUN = "lun" > DEVICE_CDROM = "cdrom" >@@ -494,7 +498,7 @@ class VirtualDisk(VirtualDevice): > _XML_PROP_ORDER = [ > "type", "device", > "driver_name", "driver_type", >- "driver_cache", "driver_io", "error_policy", >+ "driver_cache", "driver_discard", "driver_io", "error_policy", > "_xmlpath", "target", "bus", > ] > >@@ -607,6 +611,7 @@ class VirtualDisk(VirtualDevice): > read_only = XMLProperty("./readonly", is_bool=True) > shareable = XMLProperty("./shareable", is_bool=True) > driver_cache = XMLProperty("./driver/@cache") >+ driver_discard = XMLProperty("./driver/@discard") > driver_io = XMLProperty("./driver/@io") > > error_policy = XMLProperty("./driver/@error_policy") >@@ -830,6 +835,8 @@ class VirtualDisk(VirtualDevice): > # be nice if qemu did this for us but that time has long passed. > if not self.driver_cache: > self.driver_cache = self.CACHE_MODE_NONE >+ if not self.driver_discard: >+ self.driver_discard = self.DRIVER_MODE_IGNORE > if not self.driver_io: > self.driver_io = self.IO_MODE_NATIVE >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1091516
: 890154