Skip to content

CLI: add --discard-unmap and extend discard=unmap to virtio-scsi-pci - #1101

Merged
kostyanf14 merged 1 commit into
HCK-CI:masterfrom
elizashurov:discard-unmap-vioscsi
Aug 17, 2026
Merged

CLI: add --discard-unmap and extend discard=unmap to virtio-scsi-pci#1101
kostyanf14 merged 1 commit into
HCK-CI:masterfrom
elizashurov:discard-unmap-vioscsi

Conversation

@elizashurov

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/cli.rb

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-unmap and plumbs discard_unmap through CLI options into QEMU machine option config.
  • Refactors QEMU replacement maps so discard=unmap is driven by a dedicated @drive_discard_param@ replacement (and --discard-granularity implies it).
  • Extends the virtio-scsi-pci device template to include @drive_discard_param@ on its -drive line, 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.

Comment thread lib/setupmanagers/qemuhck/qemu_machine.rb Outdated
@elizashurov
elizashurov force-pushed the discard-unmap-vioscsi branch from 3e08fb6 to e3edf0b Compare August 16, 2026 13:54
Comment thread lib/cli.rb Fixed
@elizashurov
elizashurov force-pushed the discard-unmap-vioscsi branch 2 times, most recently from a1d1099 to 48500a2 Compare August 16, 2026 14:09
Comment thread lib/cli.rb Fixed
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>
@kostyanf14
kostyanf14 merged commit 3eb499f into HCK-CI:master Aug 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants