gfs2: Fix oversight in gfs2_ail1_flush
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 gfs2: Fix oversight in gfs2_ail1_flush
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.
--- fs/gfs2/log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/gfs2/log.c +3 -1
@@ -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 ; } }
Andreas Gruenbacher
maintainerPATCH 1/1 gfs2: Fix oversight in gfs2_ail1_flush
Hi Bob,
Quoted 8 lines · Bob Peterson
Under ordinary circumstances, function
gfs2_ail1_start_onewill start an item from the ail1 list writing, then return-EBUSY. This causesgfs2_ail1_flushto loop around and try again. However, it never clears the-EBUSYreturn code, so on rare occasions, like when the wbc runs out ofnr_to_write, it can remain set, which triggers an error and withdraw.This patch resets the
-EBUSYto 0 so this won't happen anymore.
this looks ok.
Thanks,
Andreas