xfs
[Top] [All Lists]

Re: [PATCH 1/3] xfs: create global stats and stats_clear in sysfs

To: billodo <billodo@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: [PATCH 1/3] xfs: create global stats and stats_clear in sysfs
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 3 Sep 2015 15:11:09 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1441298187-29064-2-git-send-email-billodo@xxxxxxxxxx>
References: <1441298187-29064-1-git-send-email-billodo@xxxxxxxxxx> <1441298187-29064-2-git-send-email-billodo@xxxxxxxxxx>
On 9/3/15 11:36 AM, billodo wrote:
> Currently, xfs global stats are in procfs. This patch introduces
> (replicates) the global stats in sysfs. Additionally a stats_clear file
> is introduced in sysfs.
> 
> Signed-off-by: Bill O'Donnell <billodo@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_stats.c | 83 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  fs/xfs/xfs_stats.h |  2 ++
>  fs/xfs/xfs_super.c | 17 ++++++++---
>  fs/xfs/xfs_sysfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  fs/xfs/xfs_sysfs.h |  1 +
>  5 files changed, 177 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c
> index f224038..856cf57 100644
> --- a/fs/xfs/xfs_stats.c
> +++ b/fs/xfs/xfs_stats.c
> @@ -29,6 +29,89 @@ static int counter_val(int idx)
>       return val;
>  }
>  
> +int xfs_stats_format(char *buf)
> +{
> +     int             i, j;
> +     int len = 0;

Oh, one other little nitpick, tab over "len" to match the rest.

> +     __uint64_t      xs_xstrat_bytes = 0;
> +     __uint64_t      xs_write_bytes = 0;
> +     __uint64_t      xs_read_bytes = 0;

<Prev in Thread] Current Thread [Next in Thread>