gfs2: log error reform
authorBob Peterson <rpeterso@redhat.com>
Wed, 10 Apr 2019 17:46:35 +0000 (11:46 -0600)
committerBob Peterson <rpeterso@redhat.com>
Mon, 10 Feb 2020 13:39:49 +0000 (07:39 -0600)
commit036330c914365f449ead353ef152fb29411cd4cb
tree27a4710422dd28daf10615d86b4df8bb63b6bced
parentb3422cacdd7e623e473b4c3977f3ee65e1fed62f
gfs2: log error reform

Before this patch, gfs2 kept track of journal io errors in two
places sd_log_error and the SDF_AIL1_IO_ERROR flag in sd_flags.
This patch consolidates the two into sd_log_error so that it
reflects the first error encountered writing to the journal.
In future patches, we will take advantage of this by checking
this value rather than having to check both when reacting to
io errors.

In addition, this fixes a tight loop in unmount: If buffers
get on the ail1 list and an io error occurs elsewhere, the
ail1 list would never be cleared because they were always busy.
So unmount would hang, waiting for the ail1 list to empty.

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