From: Christoph Hellwig <hch@infradead.org>
To: Barry Naujok <bnaujok@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: REVIEW: Fix CI lookup in leaf-form directories
Date: Mon, 23 Jun 2008 05:37:18 -0400 [thread overview]
Message-ID: <20080623093718.GA21251@infradead.org> (raw)
In-Reply-To: <op.uc6088qm3jf8g2@pc-bnaujok.melbourne.sgi.com>
On Mon, Jun 23, 2008 at 06:44:58PM +1000, Barry Naujok wrote:
> Along the same lines as the node-form directory patch last week,
> the leaf-form is not handling directory buffers properly and
> locks up.
>
> Instead of comparing buffer pointers, compare buffer block numbers
> and don't keep buffers hanging around.
Which might be a small performance penalty, but I think that's fine
for the CI lookup case.
The patch looks good to me.
But one things in the original xfs_dir2_leaf_lookup_int that barely
touched by your patch really irks me:
> - cbp = NULL;
> - for (lep = &leaf->ents[index], dbp = NULL, curdb = -1;
> + for (lep = &leaf->ents[index], dbp = NULL, curdb = -1, cidb = -1;
> index < be16_to_cpu(leaf->hdr.count) &&
> be32_to_cpu(lep->hashval) == args->hashval;
> lep++, index++) {
I'd really prefer to have not too much rather unrelated bits in the
for loop. In fact the use of the for construct here is more than odd
because there is no such things as a loop variable at all. I think
we'd be much better of in terms of readability with a simple while
loop with where all the initialization is moved out of the loop.
Probably not for this patch, though..
next prev parent reply other threads:[~2008-06-23 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 8:44 REVIEW: Fix CI lookup in leaf-form directories Barry Naujok
2008-06-23 9:37 ` Christoph Hellwig [this message]
2008-06-24 0:11 ` Barry Naujok
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=20080623093718.GA21251@infradead.org \
--to=hch@infradead.org \
--cc=bnaujok@sgi.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