[Cluster-devel] [PATCHv2 dlm-next 09/13] fs: dlm: drop rxbuf manipulation in dlm_copy_master_names

2023-08-01 Thread Alexander Aring
This patch removes the manipulation of the receive buffer in case of an error and be sure the buffer is null terminated before an error messagea is printed out. Instead of manipulate the receive buffer we tell inside the format string the maximum length the string buffer is being read. Signed-off-

[Cluster-devel] [PATCHv2 dlm-next 00/13] fs: dlm: miscs and msgs processing changes

2023-08-01 Thread Alexander Aring
Hi, this patch fixes some missing spin_unlock() that was missing in commit dc52cd2eff4a ("fs: dlm: fix F_CANCELLK to cancel pending request"). Otherwise this patch series contains: - introduce a new debugfs entry to dump all pending callbacks in the per lkb callbacks queue. - add plock char dev

[Cluster-devel] [PATCHv2 dlm-next 05/13] fs: dlm: add plock dev tracepoints

2023-08-01 Thread Alexander Aring
I currently debug nfs plock handling and introduce those two tracepoints for getting more information about what is happening there if the user space reads plock operations from kernel and writing the result back. Signed-off-by: Alexander Aring --- fs/dlm/plock.c | 6 + include/

[Cluster-devel] [PATCHv2 dlm-next 07/13] fs: dlm: cleanup lock order

2023-08-01 Thread Alexander Aring
This patch cleanups the lock order to hold at first the close_lock and then held the nodes_srcu read lock. Probably it will never be a problem as nodes_srcu is only a read lock preventing the node pointer getting freed. Signed-off-by: Alexander Aring --- fs/dlm/midcomms.c | 4 ++-- 1 file change

[Cluster-devel] [PATCHv2 dlm-next 11/13] fs: dlm: constify receive buffer

2023-08-01 Thread Alexander Aring
The dlm receive buffer should be never manipulated as DLM is the last instance of parsing layer. This patch constify the whole receive buffer so we are sure it never gets manipulated when it's being parsed. Signed-off-by: Alexander Aring --- fs/dlm/dir.c | 5 +- fs/dlm/dir.h

[Cluster-devel] [PATCHv2 dlm-next 01/13] fs: dlm: add missing spin_unlock

2023-08-01 Thread Alexander Aring
This patch fixes commit dc52cd2eff4a ("fs: dlm: fix F_CANCELLK to cancel pending request") that we don't unlock the ops_lock in a rate case when a waiter cannot be found. This case can only happen when cancellation of plock operation was successful but no kernel waiter was being found. Fixes: dc52

[Cluster-devel] [PATCHv2 dlm-next 08/13] fs: dlm: get recovery sequence number as parameter

2023-08-01 Thread Alexander Aring
This patch removes a read of the ls->ls_recover_seq uint64_t number in _create_rcom(). If the ls->ls_recover_seq is readed the ls_recover_lock need to held. However this number was always readed before when any rcom message is received and it's not necessary to read it again from a per lockspace va

[Cluster-devel] [PATCHv2 dlm-next 02/13] fs: dlm: remove unused processed_nodes

2023-08-01 Thread Alexander Aring
The variable processed_nodes is not being used by commit 1696c75f1864 ("fs: dlm: add send ack threshold and append acks to msgs"). This patch removes the leftover of this commit. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/dlm/lowcom

[Cluster-devel] [PATCHv2 dlm-next 10/13] fs: dlm: drop rxbuf manipulation in dlm_recover_master_copy

2023-08-01 Thread Alexander Aring
Currently dlm_recover_master_copy() manipulates the receive buffer of an rcom lock message and modifies it on the fly so a later memcpy() to a new rcom message with the same message has those new values. This patch avoids manipulating the received rcom message by store the values for the new rcom m

[Cluster-devel] [PATCHv2 dlm-next 06/13] fs: dlm: remove clear_members_cb

2023-08-01 Thread Alexander Aring
This patch is just a small cleanup to directly call remove_remote_member() instead of going over clear_members_cb() which just calls remove_remote_member(). Signed-off-by: Alexander Aring --- fs/dlm/member.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/dlm/member.

[Cluster-devel] [PATCHv2 dlm-next 12/13] fs: dlm: create midcomms nodes when configure

2023-08-01 Thread Alexander Aring
This patch puts the life of a midcomms node the same as a lowcomms connection. The lowcomms connection lifetime was changed by commit 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list"). In the future the midcomms node instances can be merged with lowcomms connection structure as the lifeti

[Cluster-devel] [PATCHv2 dlm-next 03/13] fs: dlm: debugfs for queued callbacks

2023-08-01 Thread Alexander Aring
It was useful to debug an issue with the callback queue to check if any callbacks in any lkb are for some reason not processed by the callback workqueue. The mentioned issue was fixed by commit a034c1370ded ("fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten"). If there are similar issue that looks

[Cluster-devel] [PATCHv2 dlm-next 04/13] fs: dlm: check on plock ops when exit dlm

2023-08-01 Thread Alexander Aring
To be sure we don't have any issues that there are leftover plock ops in either send_list or recv_list we simple check if either one of the list are empty when we exit the dlm subsystem. Signed-off-by: Alexander Aring --- fs/dlm/plock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/dl

[Cluster-devel] [PATCHv2 dlm-next 13/13] fs: dlm: don't use RCOM_NAMES for version detection

2023-08-01 Thread Alexander Aring
Currently RCOM_STATUS and RCOM_NAMES inclusive their replies are being used to determine the DLM version. The RCOM_NAMES messages are triggered in DLM recovery when calling dlm_recover_directory() only. At this time the DLM version need to be determined. I ran some tests and did not expirenced some