linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: naota@elisp.net
To: bo.li.liu@oracle.com
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs-progs: initial reference count of extent buffer is correct?
Date: Tue, 30 Sep 2014 23:39:31 +0900	[thread overview]
Message-ID: <878ul15g0s.fsf@elisp.net> (raw)
In-Reply-To: <20140825061604.GE22848@localhost.localdomain> (Liu Bo's message of "Mon, 25 Aug 2014 14:16:05 +0800")

Hi, Liu

Thank you for your explanation, and I'm sorry for this long silence.

Liu Bo <bo.li.liu@oracle.com> writes:

> You may think of it twice, commit 53ee1bccf99cd5b474fe1aa857b7dd176e3a1407 
> is to fix a bug of assigning a free block to two different extent buffers, ie.
> two different extent buffers' share the same eb->start, so it's not just bumping
> a reference cnt.
>
> Right now we want to be consistent with the kernel side, decreasing eb->refs=0
> means it'd be freed, so droping free_some_buffer() can be a good choice.

Now I understand the reason why @refs = 1 initially.

I'll post a patch to drop free_some_buffer() after this.

> And for caching extent buffer, we've increased eb->refs by 1 to keep it in the
> cache rbtree.
>
> thanks,
> -liubo

Regards,
Naohiro

      reply	other threads:[~2014-09-30 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25  5:26 btrfs-progs: initial reference count of extent buffer is correct? Naohiro Aota
2014-08-25  6:16 ` Liu Bo
2014-09-30 14:39   ` naota [this message]

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=878ul15g0s.fsf@elisp.net \
    --to=naota@elisp.net \
    --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).