[PATCH 03/24] xfs: add refcount btree stats infrastructure

Darrick J. Wong darrick.wong at oracle.com
Thu Jul 30 14:04:03 CDT 2015


On Thu, Jul 30, 2015 at 10:34:27AM +1000, Dave Chinner wrote:
> On Wed, Jul 29, 2015 at 03:33:18PM -0700, Darrick J. Wong wrote:
> > The refcount btree presents the same stats as the other btrees, so
> > add all the code for that now.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>
> > ---
> >  fs/xfs/libxfs/xfs_btree.h |    4 ++--
> >  fs/xfs/xfs_stats.c        |    1 +
> >  fs/xfs/xfs_stats.h        |   18 +++++++++++++++++-
> >  3 files changed, 20 insertions(+), 3 deletions(-)
> > 
> > 
> > diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
> > index 8d9fffe..b747c86 100644
> > --- a/fs/xfs/libxfs/xfs_btree.h
> > +++ b/fs/xfs/libxfs/xfs_btree.h
> > @@ -99,7 +99,7 @@ do {    \
> >  	case XFS_BTNUM_INO: __XFS_BTREE_STATS_INC(ibt, stat); break;	\
> >  	case XFS_BTNUM_FINO: __XFS_BTREE_STATS_INC(fibt, stat); break;	\
> >  	case XFS_BTNUM_RMAP: __XFS_BTREE_STATS_INC(rmap, stat); break;	\
> > -	case XFS_BTNUM_REFC: break;	\
> > +	case XFS_BTNUM_REFC: __XFS_BTREE_STATS_INC(refcbt, stat); break; \
> >  	case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break;	\
> >  	}       \
> >  } while (0)
> > @@ -115,7 +115,7 @@ do {    \
> >  	case XFS_BTNUM_INO: __XFS_BTREE_STATS_ADD(ibt, stat, val); break; \
> >  	case XFS_BTNUM_FINO: __XFS_BTREE_STATS_ADD(fibt, stat, val); break; \
> >  	case XFS_BTNUM_RMAP: __XFS_BTREE_STATS_ADD(rmap, stat, val); break; \
> > -	case XFS_BTNUM_REFC: break;	\
> > +	case XFS_BTNUM_REFC: __XFS_BTREE_STATS_INC(refcbt, stat); break; \
> 
> __XFS_BTREE_STATS_ADD()

Good catch; fixed.

--D

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david at fromorbit.com
> 
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs



More information about the xfs mailing list