<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ocfs2/dlm, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-10-02T23:28:44Z</updated>
<entry>
<title>ocfs2/dlm: should put mle when goto kill in dlm_assert_master_handler</title>
<updated>2014-10-02T23:28:44Z</updated>
<author>
<name>alex chen</name>
</author>
<published>2014-10-02T23:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55dacd22dba7da4d4f2ccd646cd77886e2c90dd1'/>
<id>urn:sha1:55dacd22dba7da4d4f2ccd646cd77886e2c90dd1</id>
<content type='text'>
In dlm_assert_master_handler, the mle is get in dlm_find_mle, should be
put when goto kill, otherwise, this mle will never be released.

Signed-off-by: Alex Chen &lt;alex.chen@huawei.com&gt;
Reviewed-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Reviewed-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2/dlm: do not get resource spinlock if lockres is new</title>
<updated>2014-09-26T15:10:34Z</updated>
<author>
<name>Joseph Qi</name>
</author>
<published>2014-09-25T23:05:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5760a97c7143c208fa3a8f8cad0ed7dd672ebd28'/>
<id>urn:sha1:5760a97c7143c208fa3a8f8cad0ed7dd672ebd28</id>
<content type='text'>
There is a deadlock case which reported by Guozhonghua:
  https://oss.oracle.com/pipermail/ocfs2-devel/2014-September/010079.html

This case is caused by &amp;res-&gt;spinlock and &amp;dlm-&gt;master_lock
misordering in different threads.

It was introduced by commit 8d400b81cc83 ("ocfs2/dlm: Clean up refmap
helpers").  Since lockres is new, it doesn't not require the
&amp;res-&gt;spinlock.  So remove it.

Fixes: 8d400b81cc83 ("ocfs2/dlm: Clean up refmap helpers")
Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Reviewed-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Reported-by: Guozhonghua &lt;guozhonghua@h3c.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: race between umount and unfinished remastering during recovery</title>
<updated>2014-08-07T01:01:13Z</updated>
<author>
<name>Tariq Saeed</name>
</author>
<published>2014-08-06T23:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bba1cb17d9adb8c074f138c1cc039fb2ee8c964c'/>
<id>urn:sha1:bba1cb17d9adb8c074f138c1cc039fb2ee8c964c</id>
<content type='text'>
Orabug: 19074140

When umount is issued during recovery on the new master that has not
finished remastering locks, it triggers BUG() in
dlm_send_mig_lockres_msg().  Here is the situation:

 1) node A has a lock on resource X mastered by node B.

 2) node B dies -&gt;  node A sets recovering flag for res X

 3) Node C becomes the new master for resources owned by the
    dead node and is remastering locks of the dead node but
    has not finished the remastering process yet.

 4) umount is issued on node C.

 5) During processing of umount, ignoring unfished recovery,
    node C attempts to migrate resource X to node A.

 6) node A finds res X in DLM_LOCK_RES_RECOVERING state, considers
    it a logic error and sends back -EFAULT.

 7) node C asserts BUG() upon seeing EFAULT resp from node B.

Fix is to delay migrating res X till remastering is finished at which
point recovering flag will be cleared on both A and C.

Signed-off-by: Tariq Saeed &lt;tariq.x.saeed@oracle.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: remove conversion of total_backoff in dlm_join_domain()</title>
<updated>2014-08-07T01:01:13Z</updated>
<author>
<name>Xue jiufei</name>
</author>
<published>2014-08-06T23:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7567c148835f7ac16edf662d65816640cf8e20bb'/>
<id>urn:sha1:7567c148835f7ac16edf662d65816640cf8e20bb</id>
<content type='text'>
The unit of total_backoff is msecs not jiffies, so no need to do the
conversion.  Otherwise, the join timeout is not 90 sec.

Signed-off-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Signed-off-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2/dlm: do not purge lockres that is queued for assert master</title>
<updated>2014-06-23T23:47:45Z</updated>
<author>
<name>Xue jiufei</name>
</author>
<published>2014-06-23T20:22:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac4fef4d23ed879a7fd11ab24ccd2e1464277e9a'/>
<id>urn:sha1:ac4fef4d23ed879a7fd11ab24ccd2e1464277e9a</id>
<content type='text'>
When workqueue is delayed, it may occur that a lockres is purged while it
is still queued for master assert.  it may trigger BUG() as follows.

N1                                         N2
dlm_get_lockres()
-&gt;dlm_do_master_requery
                                  is the master of lockres,
                                  so queue assert_master work

                                  dlm_thread() start running
                                  and purge the lockres

                                  dlm_assert_master_worker()
                                  send assert master message
                                  to other nodes
receiving the assert_master
message, set master to N2

dlmlock_remote() send create_lock message to N2, but receive DLM_IVLOCKID,
if it is RECOVERY lockres, it triggers the BUG().

Another BUG() is triggered when N3 become the new master and send
assert_master to N1, N1 will trigger the BUG() because owner doesn't
match.  So we should not purge lockres when it is queued for assert
master.

Signed-off-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: do not return DLM_MIGRATE_RESPONSE_MASTERY_REF to avoid endless,loop during umount</title>
<updated>2014-06-23T23:47:45Z</updated>
<author>
<name>jiangyiwen</name>
</author>
<published>2014-06-23T20:22:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9aaac5a6b7d228435fcb80963d41c274406011b'/>
<id>urn:sha1:b9aaac5a6b7d228435fcb80963d41c274406011b</id>
<content type='text'>
The following case may lead to endless loop during umount.

node A         node B               node C       node D
umount volume,
migrate lockres1
to B
                                                 want to lock lockres1,
                                                 send
                                                 MASTER_REQUEST_MSG
                                                 to C
                                    init block mle
               send
               MIGRATE_REQUEST_MSG
               to C
                                    find a block
                                    mle, and then
                                    return
                                    DLM_MIGRATE_RESPONSE_MASTERY_REF
                                    to B
               set C in refmap
                                    umount successfully
               try to umount, endless
               loop occurs when migrate
               lockres1 since C is in
               refmap

So we can fix this endless loop case by only returning
DLM_MIGRATE_RESPONSE_MASTERY_REF if it has a mastery mle when receiving
MIGRATE_REQUEST_MSG.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: jiangyiwen &lt;jiangyiwen@huawei.com&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Xue jiufei &lt;xuejiufei@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2/dlm: fix misuse of list_move_tail() in dlm_run_purge_list()</title>
<updated>2014-06-23T23:47:45Z</updated>
<author>
<name>Xue jiufei</name>
</author>
<published>2014-06-23T20:22:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a270c6d3c0d7ba914bd82da34152d1102920d805'/>
<id>urn:sha1:a270c6d3c0d7ba914bd82da34152d1102920d805</id>
<content type='text'>
When a lockres in purge list but is still in use, it should be moved to
the tail of purge list.  dlm_thread will continue to check next lockres in
purge list.  However, code list_move_tail(&amp;dlm-&gt;purge_list,
&amp;lockres-&gt;purge) will do *no* movements, so dlm_thread will purge the same
lockres in this loop again and again.  If it is in use for a long time,
other lockres will not be processed.

Signed-off-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Signed-off-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: fix deadlock when two nodes are converting same lock from PR to EX and idletimeout closes conn</title>
<updated>2014-06-23T23:47:45Z</updated>
<author>
<name>Tariq Saeed</name>
</author>
<published>2014-06-23T20:22:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27bf6305cf85cb474295c300c99cc3d10d68f50a'/>
<id>urn:sha1:27bf6305cf85cb474295c300c99cc3d10d68f50a</id>
<content type='text'>
Orabug: 18639535

Two node cluster and both nodes hold a lock at PR level and both want to
convert to EX at the same time.  Master node 1 has sent BAST and then
closes the connection due to idletime out.  Node 0 receives BAST, sends
unlock req with cancel flag but gets error -ENOTCONN.  The problem is
this error is ignored in dlm_send_remote_unlock_request() on the
**incorrect** assumption that the master is dead.  See NOTE in comment
why it returns DLM_NORMAL.  Upon getting DLM_NORMAL, node 0 proceeds to
sends convert (without cancel flg) which fails with -ENOTCONN.  waits 5
sec and resends.

This time gets DLM_IVLOCKID from the master since lock not found in
grant, it had been moved to converting queue in response to conv PR-&gt;EX
req.  No way out.

Node 1 (master)				Node 0
==============				======

  lock mode PR				PR

  convert PR -&gt; EX
  mv grant -&gt; convert and que BAST
  ...
                     &lt;-------- convert PR -&gt; EX
  convert que looks like this: ((node 1, PR -&gt; EX) (node 0, PR -&gt; EX))
  ...
                        BAST (want PR -&gt; NL)
                     ------------------&gt;
  ...
  idle timout, conn closed
                                ...
                                In response to BAST,
                                sends unlock with cancel convert flag
                                gets -ENOTCONN. Ignores and
                                sends remote convert request
                                gets -ENOTCONN, waits 5 Sec, retries
  ...
  reconnects
                   &lt;----------------- convert req goes through on next try
  does not find lock on grant que
                   status DLM_IVLOCKID
                   ------------------&gt;
  ...

No way out.  Fix is to keep retrying unlock with cancel flag until it
succeeds or the master dies.

Signed-off-by: Tariq Saeed &lt;tariq.x.saeed@oracle.com&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: remove some unused code</title>
<updated>2014-06-04T23:53:55Z</updated>
<author>
<name>Xue jiufei</name>
</author>
<published>2014-06-04T23:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e72db989e1c01fde28aabf7fd29faeaa08538e24'/>
<id>urn:sha1:e72db989e1c01fde28aabf7fd29faeaa08538e24</id>
<content type='text'>
dlm_recovery_ctxt.received is unused.

ocfs2_should_refresh_lock_res() can only return 0 or 1, so the error
handling code in ocfs2_super_lock() is unneeded.

Signed-off-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2/dlm: disallow node joining when recovery is on going</title>
<updated>2014-06-04T23:53:54Z</updated>
<author>
<name>Xue jiufei</name>
</author>
<published>2014-06-04T23:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01c6222f876062355599e5a63560c514b6de25d2'/>
<id>urn:sha1:01c6222f876062355599e5a63560c514b6de25d2</id>
<content type='text'>
We found a race situation when dlm recovery and node joining occurs
simultaneously if the network state is bad.

N1                                      N4

start joining dlm and send
query join to all live nodes
                            set joining node to N1, return OK
send query join to other
live nodes and it may take
a while

call dlm_send_join_assert()
to send assert join message
when N2 is down, so keep
trying to send message to N2
until find N2 is down

send assert join message to
N3, but connection is down
with N3, so it may take a
while
                            become the recovery master for N2
                            and send begin reco message to other
                            nodes in domain map but no N1
connection with N3 is rebuild,
then send assert join to N4
                            call dlm_assert_joined_handler(),
                            add N1 to domain_map

                            dlm recovery done, send finalize message
                            to nodes in domain map, including N1
receiving finalize message,
trigger the BUG() because
recovery master mismatch.

Signed-off-by: joyce.xue &lt;xuejiufei@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
