summaryrefslogtreecommitdiff
path: root/fs/remap_range.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14vfs: verify source area in vfs_dedupe_file_range_one()Miklos Szeredi1-1/+9
Call remap_verify_area() on the source file as well as the destination. When called from vfs_dedupe_file_range() the check as already been performed, but not so if called from layered fs (overlayfs, etc...) Could ommit the redundant check in vfs_dedupe_file_range(), but leave for now to get error early (for fear of breaking backward compatibility). This call shouldn't be performance sensitive. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-10-15vfs: move the remap range helpers to remap_range.cDarrick J. Wong1-3/+477
Complete the migration by moving the file remapping helper functions out of read_write.c and into remap_range.c. This reduces the clutter in the first file and (eventually) will make it so that we can compile out the second file if it isn't needed. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2020-10-15vfs: move generic_remap_checks out of mmDarrick J. Wong1-0/+97
I would like to move all the generic helpers for the vfs remap range functionality (aka clonerange and dedupe) into a separate file so that they won't be scattered across the vfs and the mm subsystems. The eventual goal is to be able to deselect remap_range.c if none of the filesystems need that code, but the tricky part here is picking a stable(ish) part of the merge window to rearrange code. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>