* [RFC PATCH] xfs: show uuid when mount fails due to duplicate uuid
@ 2012-01-12 2:47 Mitsuo Hayasaka
2012-01-12 16:14 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Mitsuo Hayasaka @ 2012-01-12 2:47 UTC (permalink / raw)
To: Ben Myers, Alex Elder
Cc: xfs-masters, xfs, linux-kernel, yrl.pp-manager.tt,
Mitsuo Hayasaka, Ben Myers, Alex Elder
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@hitachi.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
---
fs/xfs/xfs_mount.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index d06afbc..6b96d6e 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -158,7 +158,10 @@ 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 - can't mount: uuid = %pU",
+ uuid);
+
return XFS_ERROR(EINVAL);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] xfs: show uuid when mount fails due to duplicate uuid
2012-01-12 2:47 [RFC PATCH] xfs: show uuid when mount fails due to duplicate uuid Mitsuo Hayasaka
@ 2012-01-12 16:14 ` Christoph Hellwig
2012-01-13 2:46 ` HAYASAKA Mitsuo
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2012-01-12 16:14 UTC (permalink / raw)
To: Mitsuo Hayasaka
Cc: Ben Myers, Alex Elder, Alex Elder, linux-kernel, xfs, xfs-masters,
yrl.pp-manager.tt
On Thu, Jan 12, 2012 at 11:47:20AM +0900, Mitsuo Hayasaka wrote:
> 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.
Looks good to me,
Reviewed-by: Christoph Hellwig <hch@lst.de>
> - xfs_warn(mp, "Filesystem has duplicate UUID - can't mount");
> + xfs_warn(mp,
> + "Filesystem has duplicate UUID - can't mount: uuid = %pU",
> + uuid);
Maybe we could write this a bit nicer as:
xfs_warn(mp, "Filesystem has duplicate UUID %p - can't mount", uuid);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] xfs: show uuid when mount fails due to duplicate uuid
2012-01-12 16:14 ` Christoph Hellwig
@ 2012-01-13 2:46 ` HAYASAKA Mitsuo
0 siblings, 0 replies; 3+ messages in thread
From: HAYASAKA Mitsuo @ 2012-01-13 2:46 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Ben Myers, Alex Elder, Alex Elder, linux-kernel, xfs, xfs-masters,
yrl.pp-manager.tt
Hi Christoph,
Thank you for your comment.
(2012/01/13 1:14), Christoph Hellwig wrote:
> On Thu, Jan 12, 2012 at 11:47:20AM +0900, Mitsuo Hayasaka wrote:
>> 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.
>
> Looks good to me,
>
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
>> - xfs_warn(mp, "Filesystem has duplicate UUID - can't mount");
>> + xfs_warn(mp,
>> + "Filesystem has duplicate UUID - can't mount: uuid = %pU",
>> + uuid);
>
> Maybe we could write this a bit nicer as:
>
> xfs_warn(mp, "Filesystem has duplicate UUID %p - can't mount", uuid);
>
It looks nice.
I will send the revised patch soon.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-13 2:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 2:47 [RFC PATCH] xfs: show uuid when mount fails due to duplicate uuid Mitsuo Hayasaka
2012-01-12 16:14 ` Christoph Hellwig
2012-01-13 2:46 ` HAYASAKA Mitsuo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).