]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Prepare to withdraw as soon as an IO error occurs in log write
authorBob Peterson <rpeterso@redhat.com>
Wed, 15 May 2019 14:10:35 +0000 (09:10 -0500)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:18 +0000 (07:53 -0600)
commit9c95dbbd0e2ecbb33f11ced48c852ca3a11f5175
tree04d52fd95fe5a51cf635bedc9230d1beb78bcca7
parent4404c782836ac0cc6460c67edad14bffdff00a56
gfs2: Prepare to withdraw as soon as an IO error occurs in log write

Before this patch, function gfs2_end_log_write would detect any IO
errors writing to the journal and put out an appropriate message,
but it never set a withdrawing condition. Eventually, the log daemon
would see the error and determine it was time to withdraw, but in
the meantime, other processes could continue running as if nothing
bad ever happened. The biggest consequence is that __gfs2_glock_put
would BUG() when it saw that there were still unwritten items.

This patch sets the WITHDRAWING status as soon as an IO error is
detected, and that way, the BUG will be avoided so the file system
can be properly withdrawn and unmounted.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/lops.c