From: Christoph Hellwig <hch@infradead.org>
To: Richard Sharpe <realrichardsharpe@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: Possible small bug in xfsprogs-dev/db/metadump.c
Date: Tue, 29 Sep 2009 09:00:22 -0400 [thread overview]
Message-ID: <20090929130022.GD11375@infradead.org> (raw)
In-Reply-To: <46b8a8850909281036j1bdbf61h18b4134912735d92@mail.gmail.com>
On Mon, Sep 28, 2009 at 10:36:13AM -0700, Richard Sharpe wrote:
> >
> > ? ? ? ?if (level == 0)
> > ? ? ? ? ? ? ? ?return 1;
> >
> > which should take care of the leaf nodes by exiting early.
>
> Well, yes there is, but that is the problem I encountered. It is level
> as passed in when starting at the top of the tree, which is obtained
> from the levels value in the AGF, and is decremented by one on each
> recursion:
>
> if (!(*func)(iocur_top->data, agno, agbno, level - 1, btype, arg))
>
> However, what should really be looked at is the value bb_level in the
> header in each free-space Btree node.
I think bother are equally valid. The one passed in fro mthe top should
always be right while the ondisk one might be corrupted.
> After I made that change to my changes, I started being able to
> properly count all leaf nodes and free extents, and the numbers came
> out where I expected them to be (instead of not seeing many leaf nodes
> and vastly undercounting free extents).
Still not quite understanding your problem here. Do you have a tool
of your own that doesn't start from the btree root but only walks
subtrees? In that case you need to look at the on-disk level unless
you can find out easily what level you start at. But I don't think we
need this for the existing tools that always walk from the root.
>
>
>
>
>
> --
> Regards,
> Richard Sharpe
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
---end quoted text---
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-09-29 12:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46b8a8850909271220w372d60c3s18a543ed00825082@mail.gmail.com>
2009-09-28 17:21 ` Possible small bug in xfsprogs-dev/db/metadump.c Christoph Hellwig
2009-09-28 17:36 ` Richard Sharpe
2009-09-29 13:00 ` Christoph Hellwig [this message]
2009-09-29 15:45 ` Richard Sharpe
2009-09-30 0:16 ` Dave Chinner
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=20090929130022.GD11375@infradead.org \
--to=hch@infradead.org \
--cc=realrichardsharpe@gmail.com \
--cc=xfs@oss.sgi.com \
/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