cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 00/13] fs: dlm: fixes and change listen socket handling
@ 2020-11-03  1:04 Alexander Aring
  2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 01/13] fs: dlm: fix proper srcu api call Alexander Aring
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Alexander Aring @ 2020-11-03  1:04 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

This series fix a issue by using the wrong RCU API for sleepable rcu.

The second patch is something what I discovered by placing a new header
in front of the dlm header. This header encapsulates a dlm message.
The patch will fix issues with the ci_buffer_size and I am not sure for
what the ci_buffer_size setting is exactly used before, there was no
range protection or something else and it is used for transmit and
receive side. As I saw that the previous receive handling was using it
as the receive buffer size for "bigger" dlm messages, I changed it mostly
the same way and allowed even reading more bytes in a recvmsg(). The user
need somehow know before the actual biggest possible dlm message (which is
4096 bytes, because the buffer allocator of lowcomms). The upper layer
protocol should never request a buffer which can be above 4096 bytes,
otherwise we run in a bufferoverlow. With the recent changes of
"ci_buffer_size" it's allowed to be above 4096 bytes, the patch should be
sure we use the maximum possible payload to a dlm recovery message and
don't let this configurable.

The rest of this patch-series makes the listen socket handling better
regarding to accept socket. There exists some code path which the listen
socket should never run, but possible when we handle the listen socket as
normal connection inside the connection hash. This patch series contains
patches to prepare and finally handle the listen connection in their own
separate structure. It also do some small cleanup to avoid double close
on the listen socket and be sure we set the sock pointer to NULL if
closed, some parts of the code seems to have this required.

- Alex

changes since v2:
 - define max send buffer to 4096 instead PAGE_SIZE
   This has something to do with the DEFAULT_BUFFER_SIZE and maximum
   message length of the receive buffer and I don't know all PAGE_SIZE
   defines of all supported Linux archs.
 - add BUILD_BUG_ON for max send buffer size and PAGE_SIZE
 - add helper for connection structure initialization
 - use runtime array size variable for multi-home address fix instead
   of assign to NULL after free

Alexander Aring (13):
  fs: dlm: fix proper srcu api call
  fs: dlm: define max send buffer
  fs: dlm: add get buffer error handling
  fs: dlm: flush othercon at close
  fs: dlm: handle non blocked connect event
  fs: dlm: add helper for init connection
  fs: dlm: move connect callback in node creation
  fs: dlm: move shutdown action to node creation
  fs: dlm: refactor sctp sock parameter
  fs: dlm: listen socket out of connection hash
  fs: dlm: fix check for multi-homed hosts
  fs: dlm: constify addr_compare
  fs: dlm: check on existing node address

 fs/dlm/lockspace.c |   2 +-
 fs/dlm/lowcomms.c  | 304 ++++++++++++++++++++++++---------------------
 fs/dlm/lowcomms.h  |   2 +
 fs/dlm/member.c    |   2 +-
 fs/dlm/rcom.c      |   6 +-
 5 files changed, 168 insertions(+), 148 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-03  1:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03  1:04 [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 00/13] fs: dlm: fixes and change listen socket handling Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 01/13] fs: dlm: fix proper srcu api call Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 02/13] fs: dlm: define max send buffer Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 03/13] fs: dlm: add get buffer error handling Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 04/13] fs: dlm: flush othercon at close Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 05/13] fs: dlm: handle non blocked connect event Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 06/13] fs: dlm: add helper for init connection Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 07/13] fs: dlm: move connect callback in node creation Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 08/13] fs: dlm: move shutdown action to " Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 09/13] fs: dlm: refactor sctp sock parameter Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 10/13] fs: dlm: listen socket out of connection hash Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 11/13] fs: dlm: fix check for multi-homed hosts Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 12/13] fs: dlm: constify addr_compare Alexander Aring
2020-11-03  1:04 ` [Cluster-devel] [PATCHv2 RESEND v5.10-rc2 13/13] fs: dlm: check on existing node address Alexander Aring

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).