[PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Libvirt periodically calls 'stat' on all volumes in a storage pool,
to update fields such as 'target.allocation'.

The operation doesnt make sense for a volume which is curently being allocated.
Also, the 'target.allocation' sub-field is taken into account while copying a raw image. To suppress any (potential) corruption, libvirt must not attempt to refresh a volume currently being built.


Signed-off-by: Prerna Saxena <prerna@xxxxxxxxxxxxxxxxxx>
---
 src/storage/storage_backend.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 289f454..355fc7f 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1576,6 +1576,9 @@ virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
 {
     int ret;
 
+    if (vol->building)
+        return 0;
+
     if ((ret = virStorageBackendUpdateVolTargetInfo(&vol->target,
                                                     withBlockVolFormat,
                                                     openflags)) < 0)
-- 
1.8.3.1

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]