diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-06-18 18:21:49 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-06-21 20:05:51 +0300 |
commit | 0431d926b399d74f1cde2c355d48289c6d7fa882 (patch) | |
tree | 511af9e1cc66b14b64fb5ef8b0f508a94680015a /fs/xfs/xfs_linux.h | |
parent | b5071ada510a76eac0d02912bf66297b9e30ca59 (diff) | |
download | linux-0431d926b399d74f1cde2c355d48289c6d7fa882.tar.xz |
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>
Diffstat (limited to 'fs/xfs/xfs_linux.h')
-rw-r--r-- | fs/xfs/xfs_linux.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index 7688663b9773..c174262a074e 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h @@ -196,6 +196,8 @@ static inline uint64_t howmany_64(uint64_t x, uint32_t y) int xfs_rw_bdev(struct block_device *bdev, sector_t sector, unsigned int count, char *data, unsigned int op); +void xfs_flush_bdev_async(struct bio *bio, struct block_device *bdev, + struct completion *done); #define ASSERT_ALWAYS(expr) \ (likely(expr) ? (void)0 : assfail(NULL, #expr, __FILE__, __LINE__)) |