From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 3/4] ocfs2/dlm: clear DROPPING_REF flag when the master goes down
Date: Wed, 27 Jan 2016 09:38:01 +0800 [thread overview]
Message-ID: <56A81F79.2080708@huawei.com> (raw)
In-Reply-To: <56A73FAF.40409@huawei.com>
On 2016/1/26 17:43, xuejiufei wrote:
> If the master goes down after return in-progress for deref message. The
> lock resource on non-master node can not be purged. Clear the
> DROPPING_REF flag and recovery it.
>
> Signed-off-by: xuejiufei <xuejiufei@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
> ---
> fs/ocfs2/dlm/dlmrecovery.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
> index c5bdf02..c19059a 100644
> --- a/fs/ocfs2/dlm/dlmrecovery.c
> +++ b/fs/ocfs2/dlm/dlmrecovery.c
> @@ -2375,14 +2375,16 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
> dlm_revalidate_lvb(dlm, res, dead_node);
> if (res->owner == dead_node) {
> if (res->state & DLM_LOCK_RES_DROPPING_REF) {
> - mlog(ML_NOTICE, "%s: res %.*s, Skip "
> - "recovery as it is being freed\n",
> - dlm->name, res->lockname.len,
> - res->lockname.name);
> - } else
> - dlm_move_lockres_to_recovery_list(dlm,
> - res);
> -
> + mlog(0, "%s:%.*s: owned by "
> + "dead node %u, this node was "
> + "dropping its ref when it died. "
> + "continue, dropping the flag.\n",
> + dlm->name, res->lockname.len,
> + res->lockname.name, dead_node);
> + }
> + res->state &= ~DLM_LOCK_RES_DROPPING_REF;
> + dlm_move_lockres_to_recovery_list(dlm,
> + res);
> } else if (res->owner == dlm->node_num) {
> dlm_free_dead_locks(dlm, res, dead_node);
> __dlm_lockres_calc_usage(dlm, res);
>
prev parent reply other threads:[~2016-01-27 1:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 9:43 [Ocfs2-devel] [PATCH 3/4] ocfs2/dlm: clear DROPPING_REF flag when the master goes down xuejiufei
2016-01-27 1:38 ` Joseph Qi [this message]
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=56A81F79.2080708@huawei.com \
--to=joseph.qi@huawei.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 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).