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 <aahri...@redhat.com>
---
 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

Reply via email to