From: Chris Mason <chris.mason@oracle.com>
To: David Sterba <dave@jikos.cz>
Cc: Josef Bacik <josef@redhat.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: make sure to update total_bitmaps when freeing cache V2
Date: Fri, 24 Jun 2011 12:07:15 -0400 [thread overview]
Message-ID: <1308931535-sup-9349@shiny> (raw)
In-Reply-To: <20110624155820.GQ12709@twin.jikos.cz>
Excerpts from David Sterba's message of 2011-06-24 11:58:20 -0400:
> On Thu, Jun 23, 2011 at 03:54:26PM -0400, Josef Bacik wrote:
> > A user reported this bug again where we have more bitmaps than we are supposed
> > to. This is because we failed to load the free space cache, but don't update
> > the ctl->total_bitmaps counter when we remove entries from the tree. This patch
> > fixes this problem and we should be good to go again. Thanks,
> >
> > Signed-off-by: Josef Bacik <josef@redhat.com>
> > ---
> > V1->V2: made the patch actually correct
> > fs/btrfs/free-space-cache.c | 6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> > index 3c1a047..e7987f9 100644
> > --- a/fs/btrfs/free-space-cache.c
> > +++ b/fs/btrfs/free-space-cache.c
> > @@ -1843,7 +1843,11 @@ void __btrfs_remove_free_space_cache_locked(struct btrfs_free_space_ctl *ctl)
> > while ((node = rb_last(&ctl->free_space_offset)) != NULL) {
> > info = rb_entry(node, struct btrfs_free_space, offset_index);
> > unlink_free_space(ctl, info);
> > - kfree(info->bitmap);
> > + if (info->bitmap) {
> > + kfree(info->bitmap);
> > + ctl->total_bitmaps--;
> > + ctl->op->recalc_thresholds(ctl);
> > + }
>
> this was a result of incorrect merge resolution in
> 0965537308ac3b267ea16e731bd73870a51c53b8:
Right, I missed this one up.
-chris
prev parent reply other threads:[~2011-06-24 16:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 19:54 [PATCH] Btrfs: make sure to update total_bitmaps when freeing cache V2 Josef Bacik
2011-06-24 15:58 ` David Sterba
2011-06-24 16:07 ` Chris Mason [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=1308931535-sup-9349@shiny \
--to=chris.mason@oracle.com \
--cc=dave@jikos.cz \
--cc=josef@redhat.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).