]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: pass xfsstats structures to handlers and macros
authorBill O'Donnell <billodo@redhat.com>
Sun, 11 Oct 2015 18:19:45 +0000 (05:19 +1100)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:25:57 +0000 (12:25 -0500)
commit44df6583c1b41d5d60cf149090ec19c7f9c4d670
tree8bbbd2f0f4163b69cc5746ba2af78e33209a04bb
parent5c86e4d26bb5cd62b78eef5cf89e33fab00d2d70
xfs: pass xfsstats structures to handlers and macros

Orabug: 22913653

This patch is the next step toward per-fs xfs stats. The patch makes
the show and clear routines able to handle any stats structure
associated with a kobject.

Instead of a single global xfsstats structure, add kobject and a pointer
to a per-cpu struct xfsstats. Modify the macros that manipulate the stats
accordingly: XFS_STATS_INC, XFS_STATS_DEC, and XFS_STATS_ADD now access
xfsstats->xs_stats.

The sysfs functions need to get from the kobject back to the xfsstats
structure which contains it, and pass the pointer to the ->xs_stats
percpu structure into the show & clear routines.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
(cherry picked from commit 80529c45ab66188a0b3814ba31409b31f5fcb53d)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/xfs/xfs_linux.h
fs/xfs/xfs_stats.c
fs/xfs/xfs_stats.h
fs/xfs/xfs_super.c
fs/xfs/xfs_sysctl.c
fs/xfs/xfs_sysfs.c