From: Lucas Meneghel Rodrigues Subject: [PATCH] client/bin/partition.py: Execute blkid with -p Date: Wed, 24 Nov 2010 17:30:58 -0200 Message-ID: <1290627058-15784-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues To: autotest@test.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11268 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755605Ab0KXTbC (ORCPT ); Wed, 24 Nov 2010 14:31:02 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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