CLI: add --discard-unmap and extend discard=unmap to virtio-scsi-pci - #1101
Merged
Conversation
kostyanf14
reviewed
Aug 16, 2026
There was a problem hiding this comment.
Pull request overview
Adds a dedicated --discard-unmap CLI flag and wires it through the QEMU HCK setup so discard=unmap can be applied consistently to -drive lines for both virtio-blk-pci and virtio-scsi-pci, with --discard-granularity implying --discard-unmap.
Changes:
- Introduces
--discard-unmapand plumbsdiscard_unmapthrough CLI options into QEMU machine option config. - Refactors QEMU replacement maps so
discard=unmapis driven by a dedicated@drive_discard_param@replacement (and--discard-granularityimplies it). - Extends the
virtio-scsi-pcidevice template to include@drive_discard_param@on its-driveline, and updates user docs accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/setupmanagers/qemuhck/qemuhck.rb | Passes discard_unmap from CLI test options into per-client VM options. |
| lib/setupmanagers/qemuhck/qemu_machine.rb | Adds a dedicated drive discard replacement map and makes discard granularity replacement only handle the blk device param. |
| lib/setupmanagers/qemuhck/devices/virtio-scsi-pci.json | Appends @drive_discard_param@ to the virtio-scsi -drive invocation. |
| lib/cli.rb | Adds discard_unmap option and exposes --discard-unmap; updates --discard-granularity help text to note implication. |
| docs/Home.md | Documents the new --discard-unmap flag and updated --discard-granularity behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
elizashurov
force-pushed
the
discard-unmap-vioscsi
branch
from
August 16, 2026 13:54
3e08fb6 to
e3edf0b
Compare
elizashurov
force-pushed
the
discard-unmap-vioscsi
branch
2 times, most recently
from
August 16, 2026 14:09
a1d1099 to
48500a2
Compare
Add a standalone --discard-unmap flag that sets discard=unmap on the -drive line for both virtio-blk-pci and virtio-scsi-pci devices. --discard-granularity now implies --discard-unmap. Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
elizashurov
force-pushed
the
discard-unmap-vioscsi
branch
from
August 16, 2026 14:11
48500a2 to
08a6aea
Compare
kostyanf14
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a standalone
--discard-unmapflag that setsdiscard=unmapon the-driveline for both virtio-blk-pci and virtio-scsi-pci devices.--discard-granularitynow implies--discard-unmap.