From: Christoph Hellwig <hch@lst.de>
To: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: [PATCH 11/21] implement generic xfs_btree_lookup
Date: Fri, 1 Aug 2008 21:43:36 +0200 [thread overview]
Message-ID: <20080801194336.GE1263@lst.de> (raw)
In-Reply-To: <20080730045937.GL13395@disturbed>
On Wed, Jul 30, 2008 at 02:59:37PM +1000, Dave Chinner wrote:
> > + if (level == 0) {
> > + union xfs_btree_rec *krp;
> > +
> > + krp = cur->bc_ops->rec_addr(cur, keyno, block);
> > + cur->bc_ops->init_key_from_rec(cur, kp, krp);
> > + return kp;
>
> I think the record pointer variable "krp" is confusing with "kp", the key
> pointer. It's a record pointer; 'rp' it should be.
Ok, fixed.
> Can you make the {} consistent here ant move the comment for the
> else? i.e.
Yeah, done.
> > + /* Return if we succeeded or not. */
> > + if (keyno == 0 || keyno > xfs_btree_get_numrecs(block))
> > + *stat = 0;
> > + else
> > + *stat = ((dir != XFS_LOOKUP_EQ) || (diff == 0));
>
> Can probably kill all the extra () in that.
I've turned this into an if else if else with the superflous
braces removed.
> > --- linux-2.6-xfs.orig/fs/xfs/xfs_alloc.c 2008-07-15 17:46:52.000000000 +0200
> > +++ linux-2.6-xfs/fs/xfs/xfs_alloc.c 2008-07-15 17:51:41.000000000 +0200
> > @@ -90,6 +90,54 @@ STATIC int xfs_alloc_ag_vextent_small(xf
> > */
> >
> > /*
> > + * Lookup the record equal to [bno, len] in the btree given by cur.
> > + */
> > +STATIC int /* error */
> > +xfs_alloc_lookup_eq(
>
> Should these be xfs_allocbt_lookup_*() to be consistent
> with all the other allocbt functions (and inobt_lookup/bmbt_lookup)?
Currently only the btree_ops methods are named allocbt. Comments on
that scheme would be appreciated.
next prev parent reply other threads:[~2008-08-01 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 19:31 [PATCH 11/21] implement generic xfs_btree_lookup Christoph Hellwig
2008-07-30 4:59 ` Dave Chinner
2008-08-01 19:43 ` Christoph Hellwig [this message]
2008-08-02 1:14 ` 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=20080801194336.GE1263@lst.de \
--to=hch@lst.de \
--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