fs: dlm: bring back previous shutdown handling
authorAlexander Aring <aahringo@redhat.com>
Thu, 12 Jan 2023 22:18:42 +0000 (17:18 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 23 Jan 2023 20:36:37 +0000 (14:36 -0600)
commit54fbe0c15d9a8072e2db7f6765f50c995834e2d7
treec2ecf18fc518e674fa53ae6dec6fb06aa9e271c0
parent00908b3388255fc1d3782b744d07f327712f401f
fs: dlm: bring back previous shutdown handling

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 <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c
fs/dlm/midcomms.c