aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Marchand2009-04-22 07:01:49 -0500
committerJens Axboe2009-04-24 01:54:21 -0500
commit42dad7647aec49b3ad20dd0cb832b232a6ae514f (patch)
treeb70d4cb7706f2647e65426e24f078ddf14d6e139 /block/blk-sysfs.c
parent097102c2d04974bdfcfa16a5f3062d499842139c (diff)
downloadkernel-common-42dad7647aec49b3ad20dd0cb832b232a6ae514f.tar.gz
kernel-common-42dad7647aec49b3ad20dd0cb832b232a6ae514f.tar.xz
kernel-common-42dad7647aec49b3ad20dd0cb832b232a6ae514f.zip
block: simplify I/O stat accounting
This simplifies I/O stat accounting switching code and separates it completely from I/O scheduler switch code. Requests are accounted according to the state of their request queue at the time of the request allocation. There is no need anymore to flush the request queue when switching I/O accounting state. Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index cac4e9febe6..3ff9bba3379 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -209,14 +209,10 @@ static ssize_t queue_iostats_store(struct request_queue *q, const char *page,
209 ssize_t ret = queue_var_store(&stats, page, count); 209 ssize_t ret = queue_var_store(&stats, page, count);
210 210
211 spin_lock_irq(q->queue_lock); 211 spin_lock_irq(q->queue_lock);
212 elv_quiesce_start(q);
213
214 if (stats) 212 if (stats)
215 queue_flag_set(QUEUE_FLAG_IO_STAT, q); 213 queue_flag_set(QUEUE_FLAG_IO_STAT, q);
216 else 214 else
217 queue_flag_clear(QUEUE_FLAG_IO_STAT, q); 215 queue_flag_clear(QUEUE_FLAG_IO_STAT, q);
218
219 elv_quiesce_end(q);
220 spin_unlock_irq(q->queue_lock); 216 spin_unlock_irq(q->queue_lock);
221 217
222 return ret; 218 return ret;