Re: [PATCH 1/3] xfs: make xfs btree stats less huge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 02, 2016 at 05:20:44AM -0800, Christoph Hellwig wrote:
> 
> > --- a/fs/xfs/xfs_stats.h
> > +++ b/fs/xfs/xfs_stats.h
> > @@ -21,10 +21,30 @@
> >  
> >  #include <linux/percpu.h>
> >  
> > +enum {
> > +	__XBTS_lookup = 0,
> 
> Add a comment on top of the enum to explain these are the
> offsets into each btree type?

Will do.

> > +#define XFS_STATS_CALC_INDEX(member)	\
> > +	(offsetof(struct __xfsstats, member) / (int)sizeof(__uint32_t))
> 
> what's that int cast for?

Habit - prevents 64 bit division on 32 bit systems. But given this
is evaluated at compile time, that doesn't matter. Will remove.

> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks!

-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux