xfs
[Top] [All Lists]

Re: [PATCH v2 6/8] xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_in

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 6/8] xfs: use xfs_icluster_size_fsb in xfs_ialloc_inode_init
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Fri, 13 Dec 2013 19:52:09 +0800
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131213111437.GA23546@xxxxxxxxxxxxx>
References: <52A96809.9020702@xxxxxxxxxx> <20131213111437.GA23546@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
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

<Prev in Thread] Current Thread [Next in Thread>