On Tue, May 01, 2012 at 12:45:43AM +0800, Liu Yuan wrote: > From: Liu Yuan <tailai.ly at taobao.com> > > We should never return anything greater than sys->nr_copies. > > - use min() to get the better readability > - change this function into 'static inline' does the inlining really buy us that much? Making the vnode_info structure private to group.c has the big benefit that we force people to use accessors and not opencode variants of it. If we really want to optimize it a better thing might be to store a precalculated nr_copies value in addition to nr_zones in it. > - change sys->nr_copies as 'int' to stay in line with nr_zones Makes sense. |