summaryrefslogtreecommitdiff
path: root/scripts/find-unused-docs.sh
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2019-12-16 18:26:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-11 04:35:23 -0800
commita421f513779cb0b84b818487959ef2eb8f812a2c (patch)
tree08f8ce98cc680849c7e2444e65864c37275f3306 /scripts/find-unused-docs.sh
parent5fefc9b3e3584a1ce98da27c38e1b8dda1939d74 (diff)
fs: allow deduplication of eof block into the end of the destination file
commit a5e6ea18e3d132be4716eb5fdd520c2c234e3003 upstream. We always round down, to a multiple of the filesystem's block size, the length to deduplicate at generic_remap_check_len(). However this is only needed if an attempt to deduplicate the last block into the middle of the destination file is requested, since that leads into a corruption if the length of the source file is not block size aligned. When an attempt to deduplicate the last block into the end of the destination file is requested, we should allow it because it is safe to do it - there's no stale data exposure and we are prepared to compare the data ranges for a length not aligned to the block (or page) size - in fact we even do the data compare before adjusting the deduplication length. After btrfs was updated to use the generic helpers from VFS (by commit 34a28e3d77535e ("Btrfs: use generic_remap_file_range_prep() for cloning and deduplication")) we started to have user reports of deduplication not reflinking the last block anymore, and whence users getting lower deduplication scores. The main use case is deduplication of entire files that have a size not aligned to the block size of the filesystem. We already allow cloning the last block to the end (and beyond) of the destination file, so allow for deduplication as well. Link: https://lore.kernel.org/linux-btrfs/2019-1576167349.500456@svIo.N5dq.dFFD/ CC: stable@vger.kernel.org # 5.1+ Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/find-unused-docs.sh')
0 files changed, 0 insertions, 0 deletions