[dm-devel] calling dm_io

Kasatkin, Dmitry dmitry.kasatkin at intel.com
Thu Nov 8 16:04:44 UTC 2012


Hello,

dm_io() does following:

	if (!io_req->notify.fn)

So it expects caller to initialize notify.fn, but in couple of places
it is not done when allocating on stack...

dm-bufio.c:dm_bufio_issue_flush()
dm-raid1.c:mirror_flush()


chunk_io() does it correctly...

	struct dm_io_request io_req = {
		....,
		.notify.fn = NULL,
	};

I wonder how raid and buf io then works. By chance...

- Dmitry




More information about the dm-devel mailing list