diff options
author | Christoph Hellwig <hch@lst.de> | 2016-09-19 11:10:21 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-09-19 11:10:21 +1000 |
commit | 51446f5ba44874db4d2a93a6eb61b133e5ec1b3e (patch) | |
tree | 8c86e63cea2cab372dee653ba4fed3d4e8e68409 /crypto/ripemd.h | |
parent | 85a6e764ff5485dfe1edf5e47290e4d32ea866d5 (diff) |
xfs: rewrite and optimize the delalloc write path
Currently xfs_iomap_write_delay does up to lookups in the inode
extent tree, which is rather costly especially with the new iomap
based write path and small write sizes.
But it turns out that the low-level xfs_bmap_search_extents gives us
all the information we need in the regular delalloc buffered write
path:
- it will return us an extent covering the block we are looking up
if it exists. In that case we can simply return that extent to
the caller and are done
- it will tell us if we are beyoned the last current allocated
block with an eof return parameter. In that case we can create a
delalloc reservation and use the also returned information about
the last extent in the file as the hint to size our delalloc
reservation.
- it can tell us that we are writing into a hole, but that there is
an extent beyoned this hole. In this case we can create a
delalloc reservation that covers the requested size (possible
capped to the next existing allocation).
All that can be done in one single routine instead of bouncing up
and down a few layers. This reduced the CPU overhead of the block
mapping routines and also simplified the code a lot.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'crypto/ripemd.h')
0 files changed, 0 insertions, 0 deletions