public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/7] XFS: replace fixed size busy extent array with an rbtree
Date: Wed, 8 Oct 2008 14:49:28 -0400	[thread overview]
Message-ID: <20081008184928.GB6823@infradead.org> (raw)
In-Reply-To: <1223417377-8679-3-git-send-email-david@fromorbit.com>

> @@ -131,14 +131,8 @@ STATIC void
>  xfs_free_perag(
>  	xfs_mount_t	*mp)
>  {
> -	if (mp->m_perag) {
> -		int	agno;
> -
> -		for (agno = 0; agno < mp->m_maxagi; agno++)
> -			if (mp->m_perag[agno].pagb_list)
> -				kmem_free(mp->m_perag[agno].pagb_list);
> +	if (mp->m_perag)
>  		kmem_free(mp->m_perag);
> -	}

kmem_free(NULL) is fine, so no need for the if.  And with that there's
no need for this one-line wrapper and we can just do the free in the
caller.

>  typedef struct xfs_log_busy_slot {
> -	xfs_agnumber_t		lbc_ag;
> -	ushort			lbc_idx;	/* index in perag.busy[] */
> +	struct xfs_busy_extent	*lbc_busyp;
>  } xfs_log_busy_slot_t;

Just use xfs_busy_extent directly - there's only about a handful places
using xfs_log_busy_slot anyway.

>  xfs_log_busy_slot_t *
> -xfs_trans_add_busy(xfs_trans_t *tp, xfs_agnumber_t ag, xfs_extlen_t idx)
> +xfs_trans_add_busy(
> +	xfs_trans_t		*tp,
> +	struct xfs_busy_extent	*busyp)

And this one can lose it's return value.  It's always the second
argmument and ignored by all callers anyway.

  reply	other threads:[~2008-10-08 18:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07 22:09 [RFC, PATCH 0/7] XFS: dynamic busy extent tracking Dave Chinner
2008-10-07 22:09 ` [PATCH 1/7] XFS: rename xfs_get_perag Dave Chinner
2008-10-08 18:41   ` Christoph Hellwig
2008-10-07 22:09 ` [PATCH 2/7] XFS: replace fixed size busy extent array with an rbtree Dave Chinner
2008-10-08 18:49   ` Christoph Hellwig [this message]
2008-10-09  0:06     ` Dave Chinner
2008-10-07 22:09 ` [PATCH 3/7] XFS: Don't immediately reallocate busy extents Dave Chinner
2008-10-07 22:09 ` [PATCH 4/7] XFS: Don't use log forces when busy extents are allocated Dave Chinner
2008-10-07 22:09 ` [PATCH 5/7] XFS: Do not classify freed allocation btree blocks as busy Dave Chinner
2008-10-07 22:09 ` [PATCH 6/7] XFS: Avoid busy extent ranges rather than the entire extent Dave Chinner
2008-10-07 22:09 ` [PATCH 7/7] XFS: Simplify transaction busy extent tracking Dave Chinner
2008-10-09 18:17 ` [RFC, PATCH 0/7] XFS: dynamic " Martin Steigerwald
2008-10-09 22:33   ` Dave Chinner
2008-10-10  7:11     ` Martin Steigerwald

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=20081008184928.GB6823@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.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