<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/dlm/midcomms.c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-07-23T11:53:57Z</updated>
<entry>
<title>fs: dlm: revert check required context while close</title>
<updated>2023-07-23T11:53:57Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-05-29T21:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=566468af21cd8dedc60ffd4772c48a4f21ba5f4d'/>
<id>urn:sha1:566468af21cd8dedc60ffd4772c48a4f21ba5f4d</id>
<content type='text'>
commit c6b6d6dcc7f32767d57740e0552337c8de40610b upstream.

This patch reverts commit 2c3fa6ae4d52 ("dlm: check required context
while close"). The function dlm_midcomms_close(), which will call later
dlm_lowcomms_close(), is called when the cluster manager tells the node
got fenced which means on midcomms/lowcomms layer to disconnect the node
from the cluster communication. The node can rejoin the cluster later.
This patch was ensuring no new message were able to be triggered when we
are in the close() function context. This was done by checking if the
lockspace has been stopped. However there is a missing check that we
only need to check specific lockspaces where the fenced node is member
of. This is currently complicated because there is no way to easily
check if a node is part of a specific lockspace without stopping the
recovery. For now we just revert this commit as it is just a check to
finding possible leaks of stopping lockspaces before close() is called.

Cc: stable@vger.kernel.org
Fixes: 2c3fa6ae4d52 ("dlm: check required context while close")
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fs: dlm: remove unnecessary waker_up() calls</title>
<updated>2023-01-23T22:27:28Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=723b197bbdf1e0adbab772b8e5e022c40db6a9fe'/>
<id>urn:sha1:723b197bbdf1e0adbab772b8e5e022c40db6a9fe</id>
<content type='text'>
The wake_up() is already handled inside of midcomms_node_reset() when
switching the state to CLOSED state. So there is not need to call it
after midcomms_node_reset() again.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: move state change into else branch</title>
<updated>2023-01-23T22:27:27Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef7ef015eb333c8954d7165d216ec0c774d7e4e4'/>
<id>urn:sha1:ef7ef015eb333c8954d7165d216ec0c774d7e4e4</id>
<content type='text'>
Currently we can switch at first into DLM_CLOSE_WAIT state and then do
another state change if a condition is true. Instead of doing two state
changes we handle the other state change inside an else branch of this
condition.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: remove newline in log_print</title>
<updated>2023-01-23T22:27:26Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3186409711e64ed0a0fa767fad555a5e655022da'/>
<id>urn:sha1:3186409711e64ed0a0fa767fad555a5e655022da</id>
<content type='text'>
There is an API difference between log_print() and other printk()s to
put a newline or not. This one was introduced by mistake because
log_print() adds a newline.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: reduce the shutdown timeout to 5 secs</title>
<updated>2023-01-23T22:27:20Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11605353f27c23902b6fb993a57bd2f0baaff3b6'/>
<id>urn:sha1:11605353f27c23902b6fb993a57bd2f0baaff3b6</id>
<content type='text'>
When a shutdown is stuck, time out after 5 seconds instead of
3 minutes.  After this timeout we try a forced shutdown.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: wait until all midcomms nodes detect version</title>
<updated>2023-01-23T20:58:19Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8b750e0c99f39223115f2672ac4cfa96ecb9edd'/>
<id>urn:sha1:b8b750e0c99f39223115f2672ac4cfa96ecb9edd</id>
<content type='text'>
The current dlm version detection is very complex due to backwards
compatablilty with earlier dlm protocol versions. It takes some time to
detect if a peer node has a specific DLM version. If it's not detected,
we just cut the socket connection. There could be cases where the local
node has not detected the version yet, but the peer node has.  In these
cases, we are trying to shutdown the dlm connection with a FIN/ACK message
exchange to be sure the other peer is ready to shutdown the connection on
dlm application level.  However this mechanism is only available on DLM
protocol version 3.2 and we need to be sure the DLM version is detected
before.

To make it more robust we introduce a a "best effort" wait to wait for the
version detection before shutdown the dlm connection. This need to be
done before the kthread recoverd for recovery handling is stopped,
because recovery handling will trigger enough messages to have a version
detection going on.

It is a corner case which was detected by modprobe dlm_locktroture module
and rmmod dlm_locktorture module directly afterwards (in a looping
behaviour). In practice probably nobody would leave a lockspace immediately
after joining it.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: ignore unexpected non dlm opts msgs</title>
<updated>2023-01-23T20:42:02Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89835b064fe7421a60e40770c27d38024190a0c8'/>
<id>urn:sha1:89835b064fe7421a60e40770c27d38024190a0c8</id>
<content type='text'>
This patch ignores unexpected RCOM_NAMES/RCOM_STATUS messages.
To be backwards compatible, those messages are not part of the new
reliable DLM OPTS encapsulation header, and have their own
retransmit handling using sequence number matching  When we get
unexpected non dlm opts messages, we should allow them and let
RCOM message handling filter them out using sequence numbers.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: bring back previous shutdown handling</title>
<updated>2023-01-23T20:36:37Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54fbe0c15d9a8072e2db7f6765f50c995834e2d7'/>
<id>urn:sha1:54fbe0c15d9a8072e2db7f6765f50c995834e2d7</id>
<content type='text'>
This patch mostly reverts commit 4f567acb0b86 ("fs: dlm: remove socket
shutdown handling"). There can be situations where the dlm midcomms nodes
hash and lowcomms connection hash are not equal, but we need to guarantee
that the lowcomms are all closed on a last release of a dlm lockspace,
when a shutdown is invoked. This patch guarantees that we always close
all sockets managed by the lowcomms connection hash, and calls shutdown
for the last message sent. This ensures we don't cut the socket, which
could cause the peer to get a connection reset.

In future we should try to merge the midcomms/lowcomms hashes into one
hash and not handle both in separate hashes.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: send FIN ack back in right cases</title>
<updated>2023-01-23T20:30:07Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00908b3388255fc1d3782b744d07f327712f401f'/>
<id>urn:sha1:00908b3388255fc1d3782b744d07f327712f401f</id>
<content type='text'>
This patch moves to send a ack back for receiving a FIN message only
when we are in valid states. In other cases and there might be a sender
waiting for a ack we just let it timeout at the senders time and
hopefully all other cleanups will remove the FIN message on their
sending queue. As an example we should never send out an ACK being in
LAST_ACK state or we cannot assume a working socket communication when
we are in CLOSED state.

Cc: stable@vger.kernel.org
Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect")
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: move sending fin message into state change handling</title>
<updated>2023-01-23T20:30:06Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-01-12T22:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a58496361802070996f9bd76e941d109c4a85ebd'/>
<id>urn:sha1:a58496361802070996f9bd76e941d109c4a85ebd</id>
<content type='text'>
This patch moves the send fin handling, which should appear in a specific
state change, into the state change handling while the per node
state_lock is held. I experienced issues with other messages because
we changed the state and a fin message was sent out in a different state.

Cc: stable@vger.kernel.org
Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect")
Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
</feed>
