Re: [RFC PATCH 0/7] dm-mpath: Do not clone requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/05/14 23:44, Christoph Hellwig wrote:
> If we'd didn't clone bios the workflow would look something like this:
> 
>  - allocate new clone request in dm-mpath
>  - point clone->bio and clone->biotail to the original bio, zero
>    them out in the original request
>  - the low level driver does one or more calls to blk_update_request

At this point, if blk_update_request is called with error code,
the error is returned straight up to submitter of original bio
before dm-mpath can try other paths.

>    until clone->bio is NULL, and then calls blk_finish_request (or
>    __blk_mq_end_io) once the request has been completed,
>  - This hands control back to dm-mpath, which can now call
>    __blk_mq_end_io without blk_update_request as the low level driver
>    took care of the bio completions.

Primary reason of cloning bios was to intercept lower-layer errors
in dm-mpath for path failover decision.
If we only cloned requests, original bios were already completed
at the time blk_finish_request was called for the clone.

Other implementations were discussed back then.

blk_update_request could skip completing bios until blk_finish_request
is called. But it would become inefficient in the case of partial completion.

A callback hook could be added to blk_update_request.
However such an additional hook was considered as bad approach.

-- 
Jun'ichi Nomura, NEC Corporation

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




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux