lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2011-08-30 21:19    [W:2.195 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site