[PATCH] client/bin/partition.py: Execute blkid with -p

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

 



The flag -p makes blkid bypass the UUID cache
and read it directly from the device superblock,
which gives information faster and more reliably.

We were seeing bugs where blkid was failing and
making the mount info inconsistent. This works
around the bug (the bug was reported anyway).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 client/bin/partition.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/bin/partition.py b/client/bin/partition.py
index 355d1b3..7381f75 100644
--- a/client/bin/partition.py
+++ b/client/bin/partition.py
@@ -185,7 +185,7 @@ def get_mount_info(partition_list):
     mount_info = set()
     for p in partition_list:
         try:
-            uuid = utils.system_output('blkid -s UUID -o value %s' % p.device)
+            uuid = utils.system_output('blkid -p -s UUID -o value %s' % p.device)
         except error.CmdError:
             # fall back to using the partition
             uuid = p.device
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux