X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fxfs%2Flinux-2.6%2Fxfs_stats.c;fp=fs%2Fxfs%2Flinux-2.6%2Fxfs_stats.c;h=8955720a2c6b0685bde93bdfeff24e1006355771;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=e480b610205198db045d49c623f39578eca1636a;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/fs/xfs/linux-2.6/xfs_stats.c b/fs/xfs/linux-2.6/xfs_stats.c index e480b6102..8955720a2 100644 --- a/fs/xfs/linux-2.6/xfs_stats.c +++ b/fs/xfs/linux-2.6/xfs_stats.c @@ -56,21 +56,24 @@ xfs_read_xfsstats( }; /* Loop over all stats groups */ - for (i=j=len = 0; i < ARRAY_SIZE(xstats); i++) { + for (i=j=len = 0; i < sizeof(xstats)/sizeof(struct xstats_entry); i++) { len += sprintf(buffer + len, xstats[i].desc); /* inner loop does each group */ while (j < xstats[i].endpoint) { val = 0; /* sum over all cpus */ - for_each_possible_cpu(c) + for (c = 0; c < NR_CPUS; c++) { + if (!cpu_possible(c)) continue; val += *(((__u32*)&per_cpu(xfsstats, c) + j)); + } len += sprintf(buffer + len, " %u", val); j++; } buffer[len++] = '\n'; } /* extra precision counters */ - for_each_possible_cpu(i) { + for (i = 0; i < NR_CPUS; i++) { + if (!cpu_possible(i)) continue; xs_xstrat_bytes += per_cpu(xfsstats, i).xs_xstrat_bytes; xs_write_bytes += per_cpu(xfsstats, i).xs_write_bytes; xs_read_bytes += per_cpu(xfsstats, i).xs_read_bytes;