From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Wed, 22 Jun 2022 14:45:18 -0400 Subject: [Cluster-devel] [PATCH RESEND v5.19-rc3 15/20] fs: dlm: change -EINVAL recovery error to -EAGAIN In-Reply-To: <20220622184523.1886869-1-aahringo@redhat.com> References: <20220622184523.1886869-1-aahringo@redhat.com> Message-ID: <20220622184523.1886869-16-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 changes a -EINVAL error for dlm_master_lookup() to -EAGAIN. It is a critical error which should not happened, if it happens there exists an issue. However we still track those issues inside the lock but if they happen we try to run recovery again if those issues will get resolved. If not recovery has a logic to fail this node after several retries. Signed-off-by: Alexander Aring --- fs/dlm/dir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index fb1981654bb2..75cf0d4b2fe4 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c @@ -138,6 +138,10 @@ int dlm_recover_directory(struct dlm_ls *ls) if (error) { log_error(ls, "recover_dir lookup %d", error); + /* retry recovery and hope it's gone */ + if (error == -EINVAL) + error = -EAGAIN; + goto out_free; } -- 2.31.1