xfs
[Top] [All Lists]

Re: [PATCH 0/7 v8] xfs: stats in sysfs

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH 0/7 v8] xfs: stats in sysfs
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 28 Sep 2015 10:01:55 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5609561C.5040508@xxxxxxxxxxx>
References: <1443223380-18870-1-git-send-email-billodo@xxxxxxxxxx> <5609561C.5040508@xxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
oops, lost a line, should have been:


On 9/28/15 10:00 AM, Eric Sandeen wrote:
> Or for a more concrete example, in patch 5 you do: 
>  for_each_possible_cpu(cpu)
> -             val += *(((__u32 *)&per_cpu(xfsstats, cpu) + idx));
> +             val += *(((__u32 *)&per_cpu(*stats, cpu) + idx));
>  return val;
> 
> and then in patch 6 you do:
> 
>       for_each_possible_cpu(cpu)
> -             val += *(((__u32 *)&per_cpu(*stats, cpu) + idx));
> +             val += *(((__u32 *)per_cpu_ptr(stats, cpu) + idx));
> 
>       return val;
> 
> But this is unrelated to the purpose of patch 6; it should just be fixed
> up in a modified patch 5, i.e.
> 
>       for_each_possible_cpu(cpu)
> -             val += *(((__u32 *)&per_cpu(xfsstats, cpu) + idx));
> +             val += *(((__u32 *)per_cpu_ptr(stats, cpu) + idx));
>       return val;

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