From: Bob Peterson Date: Mon, 30 Mar 2020 08:42:02 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Fix oversight in gfs2_ail1_flush In-Reply-To: <1831596904.19467951.1585572099993.JavaMail.zimbra@redhat.com> Message-ID: <1439057493.19467991.1585572122685.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Under ordinary circumstances, function gfs2_ail1_start_one will start an item from the ail1 list writing, then return -EBUSY. This causes gfs2_ail1_flush to loop around and try again. However, it never clears the -EBUSY return code, so on rare occasions, like when the wbc runs out of nr_to_write, it can remain set, which triggers an error and withdraw. This patch resets the -EBUSY to 0 so this won't happen anymore. Signed-off-by: Bob Peterson --- fs/gfs2/log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 86c8389e77e4..0752b223b92f 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -204,8 +204,10 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc) break; ret = gfs2_ail1_start_one(sdp, wbc, tr); if (ret) { - if (ret == -EBUSY) + if (ret == -EBUSY) { + ret = 0; goto restart; + } break; } }