[dm-devel] [PATCH v2 1/3] md: multipath: Encapsulate parameters passed to selectors

Mike Snitzer snitzer at redhat.com
Tue Apr 28 17:20:29 UTC 2020


On Mon, Apr 27 2020 at  8:51pm -0400,
Gabriel Krisman Bertazi <krisman at collabora.com> wrote:

> Different selector will use different parameters, which means .io_start
> and .io_end will get their signatures modified to include more and more
> parameters.  This encapsulates the data in a structure so we can
> simplify the interface for future users.  For now it only passes
> nr_bytes, but HST will require start_time already.
> 
> Cc: Khazhismel Kumykov <khazhy at google.com>
> Signed-off-by: Gabriel Krisman Bertazi <krisman at collabora.com>

I really don't see HST's need for start_time_ns in the path selector's
end_io hook as a solid justification for this encapsulation.

Especially in that the parameters needed for ps's start_io and end_io
really aren't symmetric.  Imposing that they are just causes needless
code (an example of that is in patch 2/3).

So please drop this encapsulation.

Thanks,
Mike




More information about the dm-devel mailing list