Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed5d5f37 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

Btrfs: dev-replace: skip prealloc extents when copy nocow pages



It doens't make sense to process prealloc extents as pages will be
filled with zero when reading prealloc extents.

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d612ac59
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4480,7 +4480,8 @@ static int check_extent_to_block(struct btrfs_inode *inode, u64 start, u64 len,
	 * move on to the next inode.
	 */
	if (em->block_start > logical ||
	    em->block_start + em->block_len < logical + len) {
	    em->block_start + em->block_len < logical + len ||
	    test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) {
		free_extent_map(em);
		ret = 1;
		goto out_unlock;