]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: don't use UUID= for xfs external log
authorKarel Zak <kzak@redhat.com>
Wed, 11 Sep 2013 13:37:05 +0000 (15:37 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Sep 2013 13:37:05 +0000 (15:37 +0200)
The log UUID is usually the same as filesystem UUID, it is bad idea to
have two devices with the same UUID in the system. It seems batter to
use only LOGUUID= for xfs external log.

 # mkfs.xfs -l logdev=/dev/sdb1 /dev/sdb2

 # blkid -p -o udev /dev/sdb1 | grep FS
 ID_FS_LOGUUID=4063d453-5c01-46ce-b92f-9523d64aecc7
 ID_FS_TYPE=xfs_external_log
 ID_FS_USAGE=other

 # blkid -p -o udev /dev/sdb2 | grep FS
 ID_FS_UUID=4063d453-5c01-46ce-b92f-9523d64aecc7
 ID_FS_TYPE=xfs
 ID_FS_USAGE=filesystem

The filesystem (sdb2) uses UUID= and log (sdb1) uses LOGUUID=.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/xfs.c

index 954289127df20469009b8d4e09093d47268738f3..cea1faa3288fd014e834af0aa2cae091720755c7 100644 (file)
@@ -133,7 +133,6 @@ static int probe_xfs_log(blkid_probe pr, const struct blkid_idmag *mag)
                rhead = (struct xlog_rec_header *)&buf[i*512];
 
                if (xlog_valid_rec_header(rhead)) {
-                       blkid_probe_set_uuid(pr, rhead->h_uuid);
                        blkid_probe_set_uuid_as(pr, rhead->h_uuid, "LOGUUID");
                        return 0;
                }