linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: cleanup for __merge_refs
Date: Thu, 18 Oct 2012 15:36:38 +0800	[thread overview]
Message-ID: <507FB186.9040901@oracle.com> (raw)
In-Reply-To: <507FB062.1010806@jan-o-sch.net>

On 10/18/2012 03:31 PM, Jan Schmidt wrote:
> On Thu, October 18, 2012 at 09:10 (+0200), Liu Bo wrote:
>> Parents must be same after going through ref_for_same_block.
> 
> Well. We could kill that for the moment. However, ref_for_same_block wasn't
> meant to check for the parent. We should do ...
> 
> --- a/fs/btrfs/backref.c
> +++ b/fs/btrfs/backref.c
> @@ -400,8 +400,6 @@ static inline int ref_for_same_block(struct __prelim_ref *ref1,
>                 return 0;
>         if (ref1->key_for_search.offset != ref2->key_for_search.offset)
>                 return 0;
> -       if (ref1->parent != ref2->parent)
> -               return 0;
> 
>         return 1;
>  }
> 
> Those two lines were originally added while debugging. The idea was to merge
> indirect (parent == 0) and shared backrefs (parent != 0) to avoid the expensive
> tree search for indirect backrefs when possible.
> 
> We would need extensive testing to remove those two lines from the current
> version, though...
> 

Oh, all right, would you make this as a patch by yourself or I can send a V2 for you?

thanks,
liubo

> -Jan
> --
> 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
> 


  reply	other threads:[~2012-10-18  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  7:10 [PATCH] Btrfs: cleanup for __merge_refs Liu Bo
2012-10-18  7:31 ` Jan Schmidt
2012-10-18  7:36   ` Liu Bo [this message]
2012-10-18  7:42     ` Jan Schmidt
2012-10-18  8:01       ` Liu Bo

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=507FB186.9040901@oracle.com \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    /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).