diff mbox series

[10/24] lustre: llog: handle -EBADR for catalog processing

Message ID 1663478534-19917-11-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to 2.15.52 | expand

Commit Message

James Simmons Sept. 18, 2022, 5:22 a.m. UTC
From: Mikhail Pershin <mpershin@whamcloud.com>

Llog catalog processing might retry to get the last llog block
to check for new records if any. That might return -EBADR code
which should be considered as valid. Previously -EIO was
returned in all cases.

WC-bug-id: https://jira.whamcloud.com/browse/LU-16052
Lustre-commit: e260f751f2a21fa12 ("LU-16052 llog: handle -EBADR for catalog processing")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/48070
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/obdclass/llog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/obdclass/llog.c b/fs/lustre/obdclass/llog.c
index 0cc64ce..38904b6 100644
--- a/fs/lustre/obdclass/llog.c
+++ b/fs/lustre/obdclass/llog.c
@@ -341,8 +341,8 @@  static int llog_process_thread(void *arg)
 		/* we`ve tried to reread the chunk, but there is no
 		 * new records
 		 */
-		if (rc == -EIO && repeated && (chunk_offset + buf_offset) ==
-		    cur_offset) {
+		if (repeated && (chunk_offset + buf_offset) == cur_offset &&
+		    (rc == -EBADR || rc == -EIO)) {
 			rc = 0;
 			goto out;
 		}