From: Darrick J. Wong Date: Wed, 10 Aug 2016 01:36:28 +0000 (+1000) Subject: xfs: add rmap btree stats infrastructure X-Git-Tag: v4.8.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2aaeae985ddbb1e10bab67cd35978357c8b8d5f;p=thirdparty%2Fxfsprogs-dev.git xfs: add rmap btree stats infrastructure Source kernel commit: 00f4e4f9073cb6d455c27dc8e92b421edcdc5011 Originally-From: Dave Chinner The rmap btree will require the same stats as all the other generic btrees, so add all the code for that now. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- diff --git a/libxfs/xfs_btree.h b/libxfs/xfs_btree.h index c4d583a65..c869dd91a 100644 --- a/libxfs/xfs_btree.h +++ b/libxfs/xfs_btree.h @@ -110,7 +110,7 @@ do { \ case XFS_BTNUM_BMAP: __XFS_BTREE_STATS_INC(__mp, bmbt, stat); break; \ case XFS_BTNUM_INO: __XFS_BTREE_STATS_INC(__mp, ibt, stat); break; \ case XFS_BTNUM_FINO: __XFS_BTREE_STATS_INC(__mp, fibt, stat); break; \ - case XFS_BTNUM_RMAP: break; \ + case XFS_BTNUM_RMAP: __XFS_BTREE_STATS_INC(__mp, rmap, stat); break; \ case XFS_BTNUM_MAX: ASSERT(0); __mp = __mp /* fucking gcc */ ; break; \ } \ } while (0) @@ -131,7 +131,8 @@ do { \ __XFS_BTREE_STATS_ADD(__mp, ibt, stat, val); break; \ case XFS_BTNUM_FINO: \ __XFS_BTREE_STATS_ADD(__mp, fibt, stat, val); break; \ - case XFS_BTNUM_RMAP: break; \ + case XFS_BTNUM_RMAP: \ + __XFS_BTREE_STATS_ADD(__mp, rmap, stat, val); break; \ case XFS_BTNUM_MAX: ASSERT(0); __mp = __mp /* fucking gcc */ ; break; \ } \ } while (0)