All of lore.kernel.org
 help / color / mirror / Atom feed
* ios and sectors should be incremented on completion
@ 2014-09-26  9:12 Akira Hayakawa
  2014-10-01  8:26 ` Junichi Nomura
  0 siblings, 1 reply; 3+ messages in thread
From: Akira Hayakawa @ 2014-09-26  9:12 UTC (permalink / raw)
  To: dm-devel@redhat.com

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@valinux.co.jp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-22  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26  9:12 ios and sectors should be incremented on completion Akira Hayakawa
2014-10-01  8:26 ` Junichi Nomura
2014-10-22  1:55   ` Akira Hayakawa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.