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 <[email protected]>
---
 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

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to