[dm-devel] ios and sectors should be incremented on completion
Akira Hayakawa
hayakawa at valinux.co.jp
Fri Sep 26 09:12:36 UTC 2014
Hi,
I seems DM increments stats (ios and sectors) before completion.
Why don't you do this in dec_pending?
block/stat.txt says these values are incremented when I/O request completes.
Is this to be fixed or do you have some justifications for this behavior?
static void _dm_request(struct request_queue *q, struct bio *bio)
{
int rw = bio_data_dir(bio);
struct mapped_device *md = q->queuedata;
int cpu;
int srcu_idx;
struct dm_table *map;
map = dm_get_live_table(md, &srcu_idx);
cpu = part_stat_lock();
part_stat_inc(cpu, &dm_disk(md)->part0, ios[rw]);
part_stat_add(cpu, &dm_disk(md)->part0, sectors[rw], bio_sectors(bio));
part_stat_unlock();
--
Akira Hayakawa <hayakawa at valinux.co.jp>
More information about the dm-devel
mailing list