diff mbox series

[18/27] lustre: llog: changelog purge deletes plain llog

Message ID 1623625897-17706-19-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to 2.14.52 | expand

Commit Message

James Simmons June 13, 2021, 11:11 p.m. UTC
From: Alexander Boyko <alexander.boyko@hpe.com>

With a massive cancel records changelog could delete a plain
llog file and skip one by one record cancelling.
Also patch fixes the race between llog_destroy and llog_next_block.

HPE-bug-id: LUS-9950
WC-bug-id: https://jira.whamcloud.com/browse/LU-14688
Lustre-commit: d813c75df6798efb ("LU-14688 mdt: changelog purge deletes plain llog")
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-on: https://review.whamcloud.com/43719
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.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, 4 insertions(+)
diff mbox series

Patch

diff --git a/fs/lustre/obdclass/llog.c b/fs/lustre/obdclass/llog.c
index c342734..768bc47 100644
--- a/fs/lustre/obdclass/llog.c
+++ b/fs/lustre/obdclass/llog.c
@@ -323,6 +323,10 @@  static int llog_process_thread(void *arg)
 			CDEBUG(D_OTHER,
 			       "cur_offset %llu, chunk_offset %llu, buf_offset %u, rc = %d\n",
 			       cur_offset, (u64)chunk_offset, buf_offset, rc);
+		if (rc == -ESTALE) {
+			rc = 0;
+			goto out;
+		}
 		/* we`ve tried to reread the chunk, but there is no
 		 * new records
 		 */