public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/2] xfs: rearrange some code in xfs_bmap for better locality
Date: Mon, 11 Feb 2013 16:43:10 -0600	[thread overview]
Message-ID: <511973FE.5000608@sgi.com> (raw)
In-Reply-To: <1360559102-20432-3-git-send-email-david@fromorbit.com>

On 02/10/13 23:05, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> xfs_bmap.c is a big file, and some of the related code is spread all
> throughout the file requiring function prototypes for static
> function and jumping all through the file to follow a single call
> path. Rearrange the code so that:
>
> 	a) related functionality is grouped together; and
> 	b) functions are grouped in call dependency order
>
> While the diffstat is large, there are no code changes in the patch;
> it is just moving the functionality around and removing the function
> prototypes at the top of the file. The resulting layout of the code
> is as follows (top of file to bottom):
>
> 	- miscellaneous helper functions
> 	- extent tree block counting routines
> 	- debug/sanity checking code
> 	- bmap free list manipulation functions
> 	- inode fork format manipulation functions
> 	- internal/external extent tree seach functions
> 	- extent tree manipulation functions used during allocation
> 	- functions used during extent read/allocate/removal
> 	  operations (i.e. xfs_bmapi_write, xfs_bmapi_read,
> 	  xfs_bunmapi and xfs_getbmap)
>
> This means that following logic paths through the bmapi code is much
> simpler - most of the code relevant to a specific operation is now
> clustered together rather than spread all over the file....
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
>   fs/xfs/xfs_bmap.c |10659 ++++++++++++++++++++++++++---------------------------
>   1 file changed, 5261 insertions(+), 5398 deletions(-)

The organization looks good to me. If the file is getting that many
changes, isn't it time to fix all those spaces in the file? (looks like 
there are over 2500 unnecessary spaces in place of tabs).

--Mark.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-02-11 22:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11  5:05 [PATCH 0/2] xfs: couple of patches for 3.9 Dave Chinner
2013-02-11  5:05 ` [PATCH 1/2] xfs: limit speculative prealloc size on sparse files Dave Chinner
2013-02-11 22:00   ` Mark Tinguely
2013-02-12 13:35   ` Brian Foster
2013-02-14 23:31   ` Ben Myers
2013-02-11  5:05 ` [PATCH 2/2] xfs: rearrange some code in xfs_bmap for better locality Dave Chinner
2013-02-11 22:43   ` Mark Tinguely [this message]
2013-02-12  1:36     ` 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=511973FE.5000608@sgi.com \
    --to=tinguely@sgi.com \
    --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