xfs: async blkdev cache flush
authorDave Chinner <dchinner@redhat.com>
Fri, 18 Jun 2021 15:21:49 +0000 (08:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 21 Jun 2021 17:05:51 +0000 (10:05 -0700)
commit0431d926b399d74f1cde2c355d48289c6d7fa882
tree511af9e1cc66b14b64fb5ef8b0f508a94680015a
parentb5071ada510a76eac0d02912bf66297b9e30ca59
xfs: async blkdev cache flush

The new checkpoint cache flush mechanism requires us to issue an
unconditional cache flush before we start a new checkpoint. We don't
want to block for this if we can help it, and we have a fair chunk
of CPU work to do between starting the checkpoint and issuing the
first journal IO.

Hence it makes sense to amortise the latency cost of the cache flush
by issuing it asynchronously and then waiting for it only when we
need to issue the first IO in the transaction.

To do this, we need async cache flush primitives to submit the cache
flush bio and to wait on it. The block layer has no such primitives
for filesystems, so roll our own for the moment.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_bio_io.c
fs/xfs/xfs_linux.h