diff options
author | Jerome Marchand <jmarchan@redhat.com> | 2009-03-27 12:31:51 +0300 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-07 10:12:38 +0400 |
commit | 26308eab69aa193f7b3fb50764a64ae14544a39b (patch) | |
tree | 758f6100395a23228d042c3a9d6f7dc1922d7530 /block/blk-sysfs.c | |
parent | 6c7e8cee6a9128eeb7f83c3ad1cb243f77f5cb16 (diff) | |
download | linux-26308eab69aa193f7b3fb50764a64ae14544a39b.tar.xz |
block: fix inconsistency in I/O stat accounting code
This forces in_flight to be zero when turning off or on the I/O stat
accounting and stops updating I/O stats in attempt_merge() when
accounting is turned off.
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3ff9bba3379a..73f36beff5cd 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -209,10 +209,14 @@ static ssize_t queue_iostats_store(struct request_queue *q, const char *page, ssize_t ret = queue_var_store(&stats, page, count); spin_lock_irq(q->queue_lock); + elv_quisce_start(q); + if (stats) queue_flag_set(QUEUE_FLAG_IO_STAT, q); else queue_flag_clear(QUEUE_FLAG_IO_STAT, q); + + elv_quisce_end(q); spin_unlock_irq(q->queue_lock); return ret; |