Messages in this thread | | | Date | Tue, 30 Aug 2011 13:15:19 -0600 | From | Jens Axboe <> | Subject | Re: [PATCH 2/6] block: introduce __bio_endio() |
| |
On 2011-08-28 21:47, Namhyung Kim wrote: > Currently, bio_endio() lacks its completion tracepoint in it, > so that the bio-based devices - except DM which inserted the > tracepoint explicitly - cannot send us such an event when using > blktrace. Adding the tracepoint in the function will fix this. > > However, bio_endio() is also used for other ways like some > nested bio-handling path and request-based devices. Simply > adding will result in duplicated event for those cases. Thus > add new __bio_endio() function to do things as before but no > tracepoint. Similarly, __bio_io_error() helper was added too.
Not crazy about this solution, it seems a little fragile. And it's hard to know what the difference between bio_endio() and __bio_endio() is without looking at the code.
I think it would be cleaner to mark a bio as going inflight, so that we can check this flag on completion. If it's never been in flight, don't trigger a completion event trace for it.
-- Jens Axboe
| |