FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-04-2008, 07:02 PM
"Jun'ichi Nomura"
 
Default block: add rq->complete_io hook for request stacking

Hi Hannes,

Hannes Reinecke wrote:
> Kiyoshi Ueda wrote:
>> I'm thinking about an idea come from Mike and Jens after the session
>> at LSF'08:
>> o stacking driver clones both bio and request and uses
>> bio->bi_end_io and rq->end_io
>> o stacking driver uses blk_complete_request() in rq->end_io
>> so that stacking driver can work without queue lock
>> With this idea, we don't need to add the new hook to request,
>> and we can use request stacking on drivers using __blk_end_request().
>>
> Huh? I can't really imagine how this should work. If you start using
> bio->bi_end_io() for stacking usage you'll end up with doing weird thing
> with the bios ... Can you elaborate a bit more here?

Cloned bio's bi_end_io() can check the error.

For successful I/O, it calls something equivalent to
end_that_request_first() for the original request,
that may eventually complete the original bio and
notify the submitter.

For error, it can decide not to complete the original bio
and record the error information.

When the clone request is finally completed and rq->end_io() is
called, stacking driver can check the recorded error information
and decide whether it should take any action or just complete
the original request by blk_complete_request().

Thanks,
--
Jun'ichi Nomura, NEC Corporation of America

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org