[Pkg-libvirt-commits] [libguestfs] 91/156: sparsify: Relax requirement that output device cannot be block device (RHBZ#1122557).

Hilko Bengen bengen at moszumanska.debian.org
Sat Aug 30 08:26:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit 28822b0473901094764565daccb32df53b3a8ec6
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Jul 23 15:01:44 2014 +0100

    sparsify: Relax requirement that output device cannot be block device (RHBZ#1122557).
    
    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.
    
    (cherry picked from commit 12b54ef5e3aecd55d228a96dfb0a9ab5c8acdf4a)
---
 sparsify/cmdline.ml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sparsify/cmdline.ml b/sparsify/cmdline.ml
index d2d7e10..a1a32da 100644
--- a/sparsify/cmdline.ml
+++ b/sparsify/cmdline.ml
@@ -162,11 +162,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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list