Remove cache=none

resolves: RHEL-135749
This commit is contained in:
Richard W.M. Jones 2025-12-15 10:06:50 +00:00
parent 4396d8d266
commit 64c51fdce9
3 changed files with 74 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 797dc287fbbd5f102540ca2a24cf99a6471fca0b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 12 May 2025 11:34:35 +0100
Subject: [PATCH] output: Remove useless 'let cmd'
Commit d50966c2a4 ("lib: Make Nbdkit mini-library handle mutable")
made Nbdkit handles mutable, but didn't fix all instances where we
still used the pure handle. Fix it here.
Fixes: commit d50966c2a480bda033f6e63bb797f86c13d576bd
(cherry picked from commit 0be5d99ae71906d989cee3d48ada30fecd0f5888)
---
output/output.ml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index 14288bdc..1bcb7c4f 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -102,10 +102,8 @@ let output_to_local_file ?(changeuid = fun f -> f ()) ?(compressed = false)
| "raw" ->
let cmd = Nbdkit.create "file" in
Nbdkit.add_arg cmd "file" filename;
- if Nbdkit.version () >= (1, 22, 0) then (
- let cmd = Nbdkit.add_arg cmd "cache" "none" in
- cmd
- );
+ if Nbdkit.version () >= (1, 22, 0) then
+ Nbdkit.add_arg cmd "cache" "none";
let _, pid = Nbdkit.run_unix socket cmd in
pid

View File

@ -0,0 +1,35 @@
From 6c4ca6464d8e955bdef9b5b6cdabdffe59931bc0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 12 Dec 2025 16:18:15 +0000
Subject: [PATCH] RHEL: output/output.ml: Remove cache=none
Virt-v2v tries to reduce the amount of page cache used when writing
out the disk image to the target storage. It does this by enabling the
cache=none option in nbdkit-file-plugin.
However, use of nbdkit-file-plugin cache=none option causes data
corruption with Dell PowerMax 8000 storage (only).
As this is only an advisory setting, remove it. Use of the page cache
can be limited instead using cgroupsv2 memory settings.
Fixes: https://issues.redhat.com/browse/RHEL-135617
(cherry picked from commit 30c03c7e308b063843a7848d15890871566bbbc0)
(cherry picked from commit 24cd76732009fabd3070d1a1fcfee5cbfa5c229c)
---
output/output.ml | 2 --
1 file changed, 2 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index 1bcb7c4f..cc4dee21 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -102,8 +102,6 @@ let output_to_local_file ?(changeuid = fun f -> f ()) ?(compressed = false)
| "raw" ->
let cmd = Nbdkit.create "file" in
Nbdkit.add_arg cmd "file" filename;
- if Nbdkit.version () >= (1, 22, 0) then
- Nbdkit.add_arg cmd "cache" "none";
let _, pid = Nbdkit.run_unix socket cmd in
pid

View File

@ -8,7 +8,7 @@
Name: virt-v2v
Epoch: 1
Version: 2.7.1
Release: 18%{?dist}
Release: 19%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -89,6 +89,8 @@ Patch0058: 0058-Ignore-ERROR_NO_MORE_ITEMS-status-from-PnPUtil.patch
Patch0059: 0059-remove-timeout-before-installing-virtio-win-drivers.patch
Patch0060: 0060-convert-windows-Fix-ESP-conversion-if-C-Windows-Temp.patch
Patch0061: 0061-Update-common-submodule.patch
Patch0062: 0062-output-Remove-useless-let-cmd.patch
Patch0063: 0063-RHEL-output-output.ml-Remove-cache-none.patch
%if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no
@ -392,6 +394,10 @@ make -C tests TESTS=test-fedora-luks-on-lvm-conversion.sh check
%changelog
* Mon Dec 15 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-19
- Remove cache=none
resolves: RHEL-135749
* Mon Nov 17 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-18
- Fix pnputil driver store after conversion
resolves: RHEL-128772