Btrfs: dev-replace: skip prealloc extents when copy nocow pages
PATCH 1/1 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 Liu Bo <[email protected]>
--- fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/btrfs/scrub.c +2 -1
@@ -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;
Signature · 1 line
2.9.4
Quoted 4 lines · Liu Bo
It doens't make sense to process prealloc extents as pages will be filled with zero when reading prealloc extents.
Signed-off-by Liu Bo <[email protected]>
Reviewed-by Filipe Manana <[email protected]>
Makes sense.
Quoted 25 lines
--- fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/btrfs/scrub.c +2
-2@@ -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; --2.9.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Filipe David Manana, “Whether you think you can, or you think you can't — you're right.”
Quoted 8 lines · Filipe Manana
Quoted 4 lines · Liu Bo
It doens't make sense to process prealloc extents as pages will be filled with zero when reading prealloc extents.
Signed-off-by Liu Bo <[email protected]>Reviewed-by Filipe Manana <[email protected]>Makes sense.
Added to next, thanks.