]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - fs/xfs/xfs_rmap_item.c
xfs: use interval query for rmap alloc operations on shared files
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:48 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Oct 2016 23:26:29 +0000 (16:26 -0700)
commitceeb9c832eeca5c1c2efc54a38f67283ccb60288
tree9758e097e4b7ffcbca52b5689acc5588e83db920
parent0e07c039bac5f6ce7e3bc512ab9efb4aaa76da94
xfs: use interval query for rmap alloc operations on shared files

When it's possible for reverse mappings to overlap (data fork extents
of files on reflink filesystems), use the interval query function to
find the left neighbor of an extent we're trying to add; and be
careful to use the lookup functions to update the neighbors and/or
add new extents.

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