From: Patrick Farrell Date: Thu, 28 Feb 2019 18:02:13 +0000 (-0500) Subject: LU-11943 llog: Reset current log on ENOSPC X-Git-Tag: 2.12.52~3 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=7f4a1dd92a900a55cbb980bac3d20c32968334ec 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/#/c/30897/ 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: 5761b9576d39 ("LU-10527 obdclass: don't recycle loghandle upon ENOSPC") Signed-off-by: Patrick Farrell Change-Id: Ie5c0ab77940c1be0ec1f166e4d38080b254bed5c Reviewed-on: https://review.whamcloud.com/34347 Tested-by: Jenkins Reviewed-by: Faccini Bruno Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index dbb2c39..c5b15f1 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -579,12 +579,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);