lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 May 2017 14:35:36 +0800
From:   Gang He <ghe@...e.com>
To:     mfasheh@...sity.com, jlbec@...lplan.org
Cc:     Gang He <ghe@...e.com>, linux-kernel@...r.kernel.org,
        ocfs2-devel@....oracle.com, akpm@...ux-foundation.org
Subject: [PATCH] ocfs2: give an obvious tip for dismatch cluster names

This patch is used to add an obvious error message, due to
dismatch cluster names between on-disk and in the current cluster.
We can meet this case during OCFS2 cluster migration, if we can
give the user an obvious tip for why they can not mount the file
system after migration, they can quickly fix this dismatch problem.
Second, also move printing ocfs2_fill_super() errno to the front
of ocfs2_dismount_volume() function, since ocfs2_dismount_volume()
will also print it's own message.

Signed-off-by: Gang He <ghe@...e.com>
---
 fs/ocfs2/super.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index ca1646f..5575918 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1208,14 +1208,15 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
 read_super_error:
 	brelse(bh);
 
+	if (status)
+		mlog_errno(status);
+
 	if (osb) {
 		atomic_set(&osb->vol_state, VOLUME_DISABLED);
 		wake_up(&osb->osb_mount_event);
 		ocfs2_dismount_volume(sb, 1);
 	}
 
-	if (status)
-		mlog_errno(status);
 	return status;
 }
 
@@ -1843,6 +1844,9 @@ static int ocfs2_mount_volume(struct super_block *sb)
 	status = ocfs2_dlm_init(osb);
 	if (status < 0) {
 		mlog_errno(status);
+		if (status == -EBADR)
+			mlog(ML_ERROR, "couldn't mount because cluster name on"
+			" disk does not match the running cluster name.\n");
 		goto leave;
 	}
 
-- 
1.8.5.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ