gfs2: Recover statfs info in journal head
authorAbhi Das <adas@redhat.com>
Tue, 20 Oct 2020 20:58:05 +0000 (15:58 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 23 Oct 2020 13:47:38 +0000 (15:47 +0200)
commitbedb0f056faa94e953e7b3da5a77d25e0008364b
tree7a5d7967818d59a20d10fbd9371261a8fde088c5
parent97fd734ba17e32463742c569137f54f713c27fe0
gfs2: Recover statfs info in journal head

Apply the outstanding statfs changes in the journal head to the
master statfs file. Zero out the local statfs file for good measure.

Previously, statfs updates would be read in from the local statfs inode and
synced to the master statfs inode during recovery.

We now use the statfs updates in the journal head to update the master statfs
inode instead of reading in from the local statfs inode. To preserve backward
compatibility with kernels that can't do this, we still need to keep the
local statfs inode up to date by writing changes to it. At some point in the
future, we can do away with the local statfs inodes altogether and keep the
statfs changes solely in the journal.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/lops.c
fs/gfs2/lops.h
fs/gfs2/recovery.c