* [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages
@ 2018-02-28 1:10 Liu Bo
2018-03-01 12:52 ` Filipe Manana
0 siblings, 1 reply; 3+ messages in thread
From: Liu Bo @ 2018-02-28 1:10 UTC (permalink / raw)
To: linux-btrfs
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 <bo.li.liu@oracle.com>
---
fs/btrfs/scrub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ec56f33..9882513 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages
2018-02-28 1:10 [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages Liu Bo
@ 2018-03-01 12:52 ` Filipe Manana
2018-03-01 13:38 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Filipe Manana @ 2018-03-01 12:52 UTC (permalink / raw)
To: Liu Bo; +Cc: linux-btrfs
On Wed, Feb 28, 2018 at 1:10 AM, Liu Bo <bo.li.liu@oracle.com> wrote:
> 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 <bo.li.liu@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Makes sense.
> ---
> fs/btrfs/scrub.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index ec56f33..9882513 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Filipe David Manana,
“Whether you think you can, or you think you can't — you're right.”
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages
2018-03-01 12:52 ` Filipe Manana
@ 2018-03-01 13:38 ` David Sterba
0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2018-03-01 13:38 UTC (permalink / raw)
To: Filipe Manana; +Cc: Liu Bo, linux-btrfs
On Thu, Mar 01, 2018 at 12:52:11PM +0000, Filipe Manana wrote:
> On Wed, Feb 28, 2018 at 1:10 AM, Liu Bo <bo.li.liu@oracle.com> wrote:
> > 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 <bo.li.liu@oracle.com>
> Reviewed-by: Filipe Manana <fdmanana@suse.com>
>
> Makes sense.
Added to next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-01 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 1:10 [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages Liu Bo
2018-03-01 12:52 ` Filipe Manana
2018-03-01 13:38 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).