From: Filipe Manana <fdmanana@gmail.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: dev-replace: skip prealloc extents when copy nocow pages
Date: Thu, 1 Mar 2018 12:52:11 +0000 [thread overview]
Message-ID: <CAL3q7H5zgigVQdOmQedB8NZ12f1h-hoFjeed6nwz50qPqRpeMQ@mail.gmail.com> (raw)
In-Reply-To: <20180228011058.23906-1-bo.li.liu@oracle.com>
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.”
next prev parent reply other threads:[~2018-03-01 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-03-01 13:38 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL3q7H5zgigVQdOmQedB8NZ12f1h-hoFjeed6nwz50qPqRpeMQ@mail.gmail.com \
--to=fdmanana@gmail.com \
--cc=bo.li.liu@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).