To fix RHBZ#1056290, I prevented virt-sparsify being used if the
output device is a block device.
I have now retested this scenario and it does work (in both copying
and in-place mode), and does not delete the output device, and
therefore we can relax this restriction so only char devices are
banned.
This is useful for oVirt which uses a qcow2 formatted block device to
store virtual machines.
---
sparsify/cmdline.ml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sparsify/cmdline.ml b/sparsify/cmdline.ml
index a99c851..b1fb83f 100644
--- a/sparsify/cmdline.ml
+++ b/sparsify/cmdline.ml
@@ -167,11 +167,7 @@ read the man page virt-sparsify(1).
else
Sys.getcwd () // indisk in
- (* Check the output is not a block or char special (RHBZ#1056290). *)
- if is_block_device outdisk then
- error (f_"output '%s' cannot be a block device, it must be a regular
file")
- outdisk;
-
+ (* Check the output is not a char special (RHBZ#1056290). *)
if is_char_device outdisk then
error (f_"output '%s' cannot be a character device, it must be a
regular file")
outdisk;
--
1.9.0
Show replies by date