]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: map an inode's offset to an exact physical block
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:27 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 4 Oct 2016 18:05:44 +0000 (11:05 -0700)
commitbf5ab890cc1f5f8d7649aae7748a24501c52d30c
tree2c2f8ae61ce162c8c79cd5b8ea86266331ec83a6
parent7574d95d28ac57063609e1e907c8bdf5de1c191f
xfs: map an inode's offset to an exact physical block

Teach the bmap routine to know how to map a range of file blocks to a
specific range of physical blocks, instead of simply allocating fresh
blocks.  This enables reflink to map a file to blocks that are already
in use.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/xfs_trace.h