ocfs2: give an obvious tip for mismatched cluster names
[sfrench/cifs-2.6.git] / fs / ocfs2 / super.c
index 80efa5699fb0c3db95c3f6490feed61ada1f3f90..350066e9d60b52b77e0a002be77f7965cf884c1f 100644 (file)
@@ -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 && ocfs2_userspace_stack(osb))
+                       mlog(ML_ERROR, "couldn't mount because cluster name on"
+                       " disk does not match the running cluster name.\n");
                goto leave;
        }