[dm-devel] [PATCH for-4.2 2/3] block, dm: don't copy bios for request clones
Christoph Hellwig
hch at lst.de
Wed Jun 3 07:37:25 UTC 2015
On Mon, Jun 01, 2015 at 01:14:26AM +0000, Junichi Nomura wrote:
> > But if we only do that once on
> > path fail over it's not an actual issue.
>
> But with your patch, the fail over happens after full completion
> of the request. Is it ok?
At least for SCSI it is, although the reason why is very subtile:
>From scsi_io_completion:
/*
* If we finished all bytes in the request we are done now.
*/
if (!scsi_end_request(req, error, good_bytes, 0))
return;
/*
* Kill remainder if no retrys.
*/
if (error && scsi_noretry_cmd(cmd)) {
if (scsi_end_request(req, error, blk_rq_bytes(req), 0))
BUG();
return;
}
So for a noretry command send from dm-mpath we will never leave a command
that had an error completion around, even if it was a partial completion.
Relying on the LLDDs to get this right seems rather dangerous, though, so
it might make sense to lift the above sequence to core code after a careful
audit of other drivers to see if and how they handle partial completions.
More information about the dm-devel
mailing list