summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/flexfilelayoutxdr.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2021-01-23 01:48:22 +0100
committerDarrick J. Wong <djwong@kernel.org>2021-01-23 01:54:51 +0100
commitb0eb9e1182668b0e9cf81dbf38041cfb8c12887f (patch)
tree8000055b5b366c63ba2bc08cbcabaa40d4c0e227 /fs/nfsd/flexfilelayoutxdr.h
parentxfs: cover the log during log quiesce (diff)
downloadlinux-b0eb9e1182668b0e9cf81dbf38041cfb8c12887f.tar.xz
linux-b0eb9e1182668b0e9cf81dbf38041cfb8c12887f.zip
xfs: don't reset log idle state on covering checkpoints
Now that log covering occurs on quiesce, we'd like to reuse the underlying superblock sync for final superblock updates. This includes things like lazy superblock counter updates, log feature incompat bits in the future, etc. One quirk to this approach is that once the log is in the IDLE (i.e. already covered) state, any subsequent log write resets the state back to NEED. This means that a final superblock sync to an already covered log requires two more sb syncs to return the log back to IDLE again. For example, if a lazy superblock enabled filesystem is mount cycled without any modifications, the unmount path syncs the superblock once and writes an unmount record. With the desired log quiesce covering behavior, we sync the superblock three times at unmount time: once for the lazy superblock counter update and twice more to cover the log. By contrast, if the log is active or only partially covered at unmount time, a final superblock sync would doubly serve as the one or two remaining syncs required to cover the log. This duplicate covering sequence is unnecessary because the filesystem remains consistent if a crash occurs at any point. The superblock will either be recovered in the event of a crash or written back before the log is quiesced and potentially cleaned with an unmount record. Update the log covering state machine to remain in the IDLE state if additional covering checkpoints pass through the log. This facilitates final superblock updates (such as lazy superblock counters) via a single sb sync without losing covered status. This provides some consistency with the active and partially covered cases and also avoids harmless, but spurious checkpoints when quiescing the log. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Diffstat (limited to 'fs/nfsd/flexfilelayoutxdr.h')
0 files changed, 0 insertions, 0 deletions