]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: optimize writes to reflink files
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2016 04:53:50 +0000 (15:53 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 20 Oct 2016 04:53:50 +0000 (15:53 +1100)
commit676264207f6768746b125349bcda0cb1682512d1
treeb9f3d3f21209f5a875b51e4427d9b46141c77d08
parent904bb15f10259a1cf7d04fecf6a37e9cec2cb249
xfs: optimize writes to reflink files

Instead of reserving space as the first thing in write_begin move it past
reading the extent in the data fork.  That way we only have to read from
the data fork once and can reuse that information for trimming the extent
to the shared/unshared boundary.  Additionally this allows to easily
limit the actual write size to said boundary, and avoid a roundtrip on the
ilock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iomap.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_reflink.h
fs/xfs/xfs_trace.h