From: Joseph Qi <jiangqi903@gmail.com>
To: Gang He <ghe@suse.com>, mfasheh@versity.com, jlbec@evilplan.org
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: give an obvious tip for dismatch cluster names
Date: Thu, 18 May 2017 17:42:59 +0800 [thread overview]
Message-ID: <e1f15ab4-c9ad-8f65-95bc-45c05aea6cf9@gmail.com> (raw)
In-Reply-To: <1495089336-19312-1-git-send-email-ghe@suse.com>
Hi Gang,
How can we confirm EBADR is only because cluster name mismatch?
Since the cluster stack may be o2cb(o2dlm) or user(fsdlm).
Thanks,
Joseph
On 17/5/18 14:35, Gang He wrote:
> 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@suse.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;
> }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Joseph Qi <jiangqi903@gmail.com>
To: Gang He <ghe@suse.com>, mfasheh@versity.com, jlbec@evilplan.org
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: give an obvious tip for dismatch cluster names
Date: Thu, 18 May 2017 17:42:59 +0800 [thread overview]
Message-ID: <e1f15ab4-c9ad-8f65-95bc-45c05aea6cf9@gmail.com> (raw)
In-Reply-To: <1495089336-19312-1-git-send-email-ghe@suse.com>
Hi Gang,
How can we confirm EBADR is only because cluster name mismatch?
Since the cluster stack may be o2cb(o2dlm) or user(fsdlm).
Thanks,
Joseph
On 17/5/18 14:35, Gang He wrote:
> 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@suse.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;
> }
>
>
next prev parent reply other threads:[~2017-05-18 9:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 6:35 [PATCH] ocfs2: give an obvious tip for dismatch cluster names Gang He
2017-05-18 6:35 ` [Ocfs2-devel] " Gang He
2017-05-18 9:42 ` Joseph Qi [this message]
2017-05-18 9:42 ` Joseph Qi
2017-05-18 10:43 ` Gang He
2017-05-18 10:43 ` Gang He
2017-05-19 0:46 ` Joseph Qi
2017-05-19 0:46 ` Joseph Qi
2017-05-19 2:15 ` Gang He
2017-05-19 2:15 ` Gang He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1f15ab4-c9ad-8f65-95bc-45c05aea6cf9@gmail.com \
--to=jiangqi903@gmail.com \
--cc=ghe@suse.com \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@versity.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.