From: Eric Sandeen <sandeen@sandeen.net>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs_repair: Add inline function to get avl tree node
Date: Tue, 08 Nov 2011 12:56:19 -0600 [thread overview]
Message-ID: <4EB97B53.7080600@sandeen.net> (raw)
In-Reply-To: <1320777990-6556-2-git-send-email-cmaiolino@redhat.com>
On 11/8/11 12:46 PM, Carlos Maiolino wrote:
> dd get_inode_offset() inline function, which will return the offset
> of a specific node in the AVL tree avoiding the need to calculate the
> the offset each time it needs to be used.
might be good to find the open-coded instances of this, and
make them use the helper too.
-Eric
> ---
> repair/incore.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/repair/incore.h b/repair/incore.h
> index ee0e86a..8e311c9 100644
> --- a/repair/incore.h
> +++ b/repair/incore.h
> @@ -311,6 +311,12 @@ void get_inode_rec(struct xfs_mount *mp, xfs_agnumber_t agno,
> ino_tree_node_t *ino_rec);
>
> extern avltree_desc_t **inode_tree_ptrs;
> +
> +static inline int
> +get_inode_offset(struct xfs_mount *mp, xfs_ino_t ino, ino_tree_node_t *irec)
> +{
> + return XFS_INO_TO_AGINO(mp, ino) - irec->ino_startnum;
> +}
> static inline ino_tree_node_t *
> findfirst_inode_rec(xfs_agnumber_t agno)
> {
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-11-08 18:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 18:46 [PATCH 0/2] Set lost+found inode as used after its allocation Carlos Maiolino
2011-11-08 18:46 ` [PATCH 1/2] xfs_repair: Add inline function to get avl tree node Carlos Maiolino
2011-11-08 18:56 ` Eric Sandeen [this message]
2011-11-08 19:02 ` Carlos Maiolino
2011-11-08 19:07 ` Christoph Hellwig
2011-11-08 18:46 ` [PATCH 2/2] xfs_repair: Properly set lost+found inode as used Carlos Maiolino
2011-11-08 18:55 ` Eric Sandeen
2011-11-08 19:07 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2011-11-09 16:54 [PATCH 0/2] Set lost+found inode as used after its allocation Carlos Maiolino
2011-11-09 16:54 ` [PATCH 1/2] xfs_repair: Add inline function to get avl tree node Carlos Maiolino
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=4EB97B53.7080600@sandeen.net \
--to=sandeen@sandeen.net \
--cc=cmaiolino@redhat.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