From: Alexander Aring Date: Thu, 13 Jul 2023 13:08:35 -0400 Subject: [Cluster-devel] [PATCH dlm-tool 1/2] fs: dlm: handle DLM_PLOCK_FL_NO_REPLY Message-ID: <20230713170836.3583715-1-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch will handle a newly introduced op flag DLM_PLOCK_FL_NO_REPLY to be sure we never send a result back in case of the kernel doesn't expect never a result back. --- dlm_controld/plock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index a91aecb0..ab19e8d7 100644 --- a/dlm_controld/plock.c +++ b/dlm_controld/plock.c @@ -9,6 +9,10 @@ #include "dlm_daemon.h" #include +#ifndef DLM_PLOCK_FL_NO_REPLY +#define DLM_PLOCK_FL_NO_REPLY 2 +#endif + static uint32_t plock_read_count; static uint32_t plock_recv_count; static uint32_t plock_rate_delays; @@ -680,6 +684,12 @@ static void write_result(struct dlm_plock_info *in, int rv) { int write_rv; + if (in->flags & DLM_PLOCK_FL_NO_REPLY) { + log_debug("write_result: ignored rv %d fd %d\n", + rv, plock_device_fd); + return; + } + in->rv = rv; write_rv = write(plock_device_fd, in, sizeof(struct dlm_plock_info)); if (write_rv < 0) -- 2.31.1