]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: only grab shared inode locks for source file during reflink
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 18 Jan 2018 22:07:53 +0000 (14:07 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jan 2018 15:27:23 +0000 (07:27 -0800)
commit01c2e13dcae9757ea987af8933f9fcc6e33f2d7c
tree369b006ec50bc6d70de8a3085482e9bc49655068
parent7c2d238ac6c435c07780a54719760da2beb46a43
xfs: only grab shared inode locks for source file during reflink

Reflink and dedupe operations remap blocks from a source file into a
destination file.  The destination file needs exclusive locks on all
levels because we're updating its block map, but the source file isn't
undergoing any block map changes so we can use a shared lock.

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