Am Sat 01 Sep 2007 12:43:57 AM CEST schrieb Kiyoshi Ueda
<k-ueda@xxxxxxxxxxxxx>:
This patch moves the rq->end_io() calling point to the top of
blk_end_request() from the last of end_that_request_last().
This means that whole request completion can be hooked by rq->end_io()
because all device drivers call blk_end_request() to complete request.
Because the meaning of rq->end_io() is changed, existing rq->end_io()
users are changed as below:
o Create a new end_io handler using blk_end_io().
blk_end_io() is a default rq->end_io() handler and can take
a callback function, which is called after end_that_request_last().
So the old end_io() handler can be used as the callback.
o Set the new end_io handler to rq->end_io.
Hmm. I must say I don't really like it.
Defining a callback function which itself takes a callback as an argument
looks like a conceptual weakness.
It's actually possible to solve it differently: We could insert a bio in
front of the bio list of the cloned request, which can take a pointer to
the request in it's ->bi_endio callback. This way, the bio can serve as
a meta-callback for the request and everything can be done there.
This way we don't have to change the interface at all and everything
works as expected.
I'll post a patch shortly.
Cheers,
Hannes
---
No .sig today, my .message went away ...
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel