From 0cba3cc14fa68b8f43833abfb6f7bc3e547bce03 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Thu, 28 Feb 2019 12:56:41 -0500 Subject: [PATCH] LU-11943 llog: Reset current log on ENOSPC The original LU-10527 patch: "LU-10527 obdclass: don't recycle loghandle upon ENOSPC" https://review.whamcloud.com/33850 Kept the current log on ENOSPC. This appears to cause llog corruption on failover, and the other part of the original patch (removing an incorrect assert) should be sufficient to fix the original issue. Fixes: 51e962be60cf ("LU-10527 obdclass: don't recycle loghandle upon ENOSPC") Signed-off-by: Patrick Farrell Change-Id: I5b9de69b8e737ca540e9a5af9ff6d1181213a0eb Reviewed-on: https://review.whamcloud.com/34346 Tested-by: Jenkins Reviewed-by: Faccini Bruno Reviewed-by: Andreas Dilger Tested-by: Maloo --- lustre/obdclass/llog_cat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 248eab5..e85e08b 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -486,12 +486,7 @@ retry: up_write(&loghandle->lgh_lock); /* nobody should be trying to use this llog */ down_write(&cathandle->lgh_lock); - /* only reset current log if still room in catalog, to - * avoid unnecessarily and racy creation of new and - * partially initialized llog_handle - */ - if ((cathandle->u.chd.chd_current_log == loghandle) && - rc != -ENOSPC) + if (cathandle->u.chd.chd_current_log == loghandle) cathandle->u.chd.chd_current_log = NULL; up_write(&cathandle->lgh_lock); RETURN(rc); -- 1.8.3.1