public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH v2 6/8] xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_init
Date: Fri, 13 Dec 2013 19:52:09 +0800	[thread overview]
Message-ID: <52AAF4E9.60408@oracle.com> (raw)
In-Reply-To: <20131213111437.GA23546@infradead.org>

On 12/13 2013 19:14 PM, Christoph Hellwig wrote:
>> +	 * Loop over the new block(s), filling in the inodes.  For small block
>> +	 * sizes, manipulate the inodes in buffers  which are multiples of the
>> +	 * blocks size.
>>  	 */
>> +	blks_per_cluster = xfs_icluster_size_fsb(mp);
>> +	inodes_per_cluster = blks_per_cluster << mp->m_sb.sb_inopblog;
>> +	nbufs = length / blks_per_cluster;
> 
> I don't think there's a point to have the nbufs variable as it's used
> just once as the loop termination condition.
Thanks for the review, and that sounds make sense to me given that compiler
would mostly likely optimize this situation to calculate nbufs only once in
the loop, but I also consider that might affect a bit readabilities in either
case...

Thanks,
-Jeff

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

      reply	other threads:[~2013-12-13 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12  7:38 [PATCH v2 6/8] xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_init Jeff Liu
2013-12-13 11:14 ` Christoph Hellwig
2013-12-13 11:52   ` Jeff Liu [this message]

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=52AAF4E9.60408@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=hch@infradead.org \
    --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