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

Eric Sandeen sandeen at sandeen.net
Mon Sep 28 10:01:55 CDT 2015


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;



More information about the xfs mailing list