xfs
[Top] [All Lists]

[PATCH] xfs: show uuid when mount fails due to duplicate uuid

To: Ben Myers <bpm@xxxxxxx>, Alex Elder <aelder@xxxxxxx>, Christoph Hellwig <hch@xxxxxx>
Subject: [PATCH] xfs: show uuid when mount fails due to duplicate uuid
From: Mitsuo Hayasaka <mitsuo.hayasaka.hu@xxxxxxxxxxx>
Date: Fri, 13 Jan 2012 14:58:39 +0900
Cc: xfs-masters@xxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, yrl.pp-manager.tt@xxxxxxxxxxx, Mitsuo Hayasaka <mitsuo.hayasaka.hu@xxxxxxxxxxx>, Ben Myers <bpm@xxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>
User-agent: StGIT/0.14.3
When a system tries to mount a filesystem (FS) using UUID, the xfs
returns -EINVAL and shows a message if a FS with the same UUID has
been already mounted. It is useful to output the duplicate UUID
with it.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@xxxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Cc: Ben Myers <bpm@xxxxxxx>
Cc: Alex Elder <elder@xxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
---

 fs/xfs/xfs_mount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index d06afbc..e07f852 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -158,7 +158,7 @@ xfs_uuid_mount(
 
  out_duplicate:
        mutex_unlock(&xfs_uuid_table_mutex);
-       xfs_warn(mp, "Filesystem has duplicate UUID - can't mount");
+       xfs_warn(mp, "Filesystem has duplicate UUID %pU - can't mount", uuid);
        return XFS_ERROR(EINVAL);
 }
 

<Prev in Thread] Current Thread [Next in Thread>