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

James Simmons jsimmons at infradead.org
Sun Jun 13 16:11:28 PDT 2021

From: Alexander Boyko <alexander.boyko at 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 at hpe.com>
Reviewed-on: https://review.whamcloud.com/43719
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Mike Pershin <mpershin at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/obdclass/llog.c | 4 ++++
 1 file changed, 4 insertions(+)

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)
 			       "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

More information about the lustre-devel mailing list