public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH 2/2] xfs: tidy up xfs_set_inode32
Date: Mon, 7 Jul 2014 14:21:17 -0400	[thread overview]
Message-ID: <20140707182117.GE4123@laptop.bfoster> (raw)
In-Reply-To: <53B4E2C5.1000303@sandeen.net>

On Wed, Jul 02, 2014 at 11:57:41PM -0500, Eric Sandeen wrote:
> xfs_set_inode32() caught my eye because it had
> weird spacing around the "-1's".  In cleaning that
> up, I realized that the assignment in the declaration
> of "ino" is never used; it's rewritten before it gets
> read.
> 
> Drop the ino initializer from its declaration since it's
> not used, and move the agino initialization into the body
> of the function, mostly so that we can have pretty
> whitespace and not exceed 80 columns.  :)
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index e71c0f8..39c9315 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -609,8 +609,8 @@ xfs_set_inode32(struct xfs_mount *mp, xfs_agnumber_t agcount)
>  	xfs_agnumber_t	maxagi = 0;
>  	xfs_sb_t	*sbp = &mp->m_sb;
>  	xfs_agnumber_t	max_metadata;
> -	xfs_agino_t	agino =	XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0);
> -	xfs_ino_t	ino = XFS_AGINO_TO_INO(mp, sbp->sb_agcount -1, agino);
> +	xfs_agino_t	agino;
> +	xfs_ino_t	ino;
>  	xfs_perag_t	*pag;
>  
>  	/* Calculate how much should be reserved for inodes to meet
> @@ -628,6 +628,8 @@ xfs_set_inode32(struct xfs_mount *mp, xfs_agnumber_t agcount)
>  		max_metadata = agcount;
>  	}
>  
> +	agino =	XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);
> +
>  	for (index = 0; index < agcount; index++) {
>  		ino = XFS_AGINO_TO_INO(mp, index, agino);
>  
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

  reply	other threads:[~2014-07-07 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03  4:54 [PATCH 1/2] xfs: allow inode allocations in post-growfs disk space Eric Sandeen
2014-07-03  4:57 ` [PATCH 2/2] xfs: tidy up xfs_set_inode32 Eric Sandeen
2014-07-07 18:21   ` Brian Foster [this message]
2014-07-07 18:21 ` [PATCH 1/2] xfs: allow inode allocations in post-growfs disk space Brian Foster
2014-07-07 19:01   ` Eric Sandeen
2014-07-07 19:38     ` Brian Foster

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=20140707182117.GE4123@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    --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