All of lore.kernel.org
 help / color / mirror / Atom feed
From: jiangyiwen <jiangyiwen@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel]  [RFC] ocfs2: Double about ocfs2_trylock_journal
Date: Tue, 1 Mar 2016 11:19:14 +0800	[thread overview]
Message-ID: <56D50A32.8060505@huawei.com> (raw)

ocfs2_trylock_journal() is used to test if the node who occupied this
slot is alive in ocfs2_mark_dead_nodes(), but actually it can't achieve
the desired results. The problem can be described as follows:

N1              N2                        N3
crash, previously
occupied in slot 1
                begin mount, only have
                N2,N3 in domain_map,
                and found slot 1 is occupied,
                then call ocfs2_trylock_journal()
                                          N3 is lockres master of
                                          journal:0001, but N3 doesn't
                                          find N1 down, so return
                                          DLM_NOTQUEUED to N2
                Because N3 doesn't find N1
                down, so ocfs2_trylock_journal()
                return EAGAIN, and will not
                recover N1
                                          in this moment, N3 crash
                N2 only recover N3 in this
                situation, and then begin
                update some meta data which
                also have been operated in
                journal:0001
N1 starts, mount
volume, and recover
journal:0001, this
will cover meta data
which N2 has modified,
and then cause filesystem
is destroyed.

So I want to know if someone has a good idea to solve this problem?

Thanks,
Yiwen Jiang.

                 reply	other threads:[~2016-03-01  3:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=56D50A32.8060505@huawei.com \
    --to=jiangyiwen@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 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.