render / rpms / libvirt

Forked from rpms/libvirt 4 months ago
Clone
6ae9ed
From d47f085cfcfc3913f6a3091488073609af4db61a Mon Sep 17 00:00:00 2001
6ae9ed
Message-Id: <d47f085cfcfc3913f6a3091488073609af4db61a@dist-git>
6ae9ed
From: Martin Kletzander <mkletzan@redhat.com>
6ae9ed
Date: Tue, 2 Aug 2016 07:10:13 +0200
6ae9ed
Subject: [PATCH] storage: Document wiping formatted volume types
6ae9ed
6ae9ed
When wiping a volume we just rewrite all the data of the volume, not
6ae9ed
only the content.  Since format gets overridden, we need to recreate the
6ae9ed
volume.  However we can't do that for every possible format out there.
6ae9ed
Since it was only coded for the ploop volume type, let's document what
6ae9ed
might be the consequences instead of forbidding it for every other
6ae9ed
format out there.
6ae9ed
6ae9ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868771
6ae9ed
6ae9ed
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
6ae9ed
(cherry picked from commit fa4eea8063b972a600903e3441bf04415529a7e9)
6ae9ed
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
6ae9ed
---
6ae9ed
 src/libvirt-storage.c | 15 ++++++++++-----
6ae9ed
 1 file changed, 10 insertions(+), 5 deletions(-)
6ae9ed
6ae9ed
diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c
6ae9ed
index cebe02f..48996ba 100644
6ae9ed
--- a/src/libvirt-storage.c
6ae9ed
+++ b/src/libvirt-storage.c
6ae9ed
@@ -1725,11 +1725,16 @@ virStorageVolDelete(virStorageVolPtr vol,
6ae9ed
  * @vol: pointer to storage volume
6ae9ed
  * @flags: extra flags; not used yet, so callers should always pass 0
6ae9ed
  *
6ae9ed
- * Ensure data previously on a volume is not accessible to future
6ae9ed
- * reads. Also note, that depending on the actual volume
6ae9ed
- * representation, this call may not really overwrite the
6ae9ed
- * physical location of the volume. For instance, files stored
6ae9ed
- * journaled, log structured, copy-on-write, versioned, and
6ae9ed
+ * Ensure data previously on a volume is not accessible to future reads.
6ae9ed
+ *
6ae9ed
+ * The data to be wiped may include the format and possibly size information,
6ae9ed
+ * so non-raw images might become raw with a different size. It is storage
6ae9ed
+ * backend dependent whether the format and size information is regenerated
6ae9ed
+ * once the initial volume wipe is completed.
6ae9ed
+ *
6ae9ed
+ * Depending on the actual volume representation, this call may not
6ae9ed
+ * overwrite the physical location of the volume. For instance, files
6ae9ed
+ * stored journaled, log structured, copy-on-write, versioned, and
6ae9ed
  * network file systems are known to be problematic.
6ae9ed
  *
6ae9ed
  * Returns 0 on success, or -1 on error
6ae9ed
-- 
6ae9ed
2.9.2
6ae9ed