aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-05-19 15:38:29 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-05-20 14:34:53 -0400
commit575969a0dd3fe65c6556bcb8f87c42303326ea55 (patch)
tree0db18fa173b20076e03b5b9c4be4c31c56baa438 /block/blk-cgroup.h
parent5624a4e445e2ec27582984b068d7bf7f127cee10 (diff)
blk-cgroup: Make 64bit per cpu stats safe on 32bit arch
Some of the stats are 64bit and updation will be non atomic on 32bit architecture. Use sequence counters on 32bit arch to make reading of stats safe. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index fd730a24b491..262226798093 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -14,6 +14,7 @@
14 */ 14 */
15 15
16#include <linux/cgroup.h> 16#include <linux/cgroup.h>
17#include <linux/u64_stats_sync.h>
17 18
18enum blkio_policy_id { 19enum blkio_policy_id {
19 BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */ 20 BLKIO_POLICY_PROP = 0, /* Proportional Bandwidth division */
@@ -154,6 +155,7 @@ struct blkio_group_stats {
154struct blkio_group_stats_cpu { 155struct blkio_group_stats_cpu {
155 uint64_t sectors; 156 uint64_t sectors;
156 uint64_t stat_arr_cpu[BLKIO_STAT_CPU_NR][BLKIO_STAT_TOTAL]; 157 uint64_t stat_arr_cpu[BLKIO_STAT_CPU_NR][BLKIO_STAT_TOTAL];
158 struct u64_stats_sync syncp;
157}; 159};
158 160
159struct blkio_group { 161struct blkio_group {