[dm-devel] [patch 2/2] dm-delay: add third flush class

Mikulas Patocka mpatocka at redhat.com
Tue Apr 17 19:12:51 UTC 2018



On Tue, 17 Apr 2018, Mike Snitzer wrote:

> On Mon, Apr 16 2018 at  6:33pm -0400,
> Mikulas Patocka <mpatocka at redhat.com> wrote:
> 
> > This patch adds a new class for dm-delay that delays flush requests.
> > Previously, flushes were delayed as writes, but it caused problems if the
> > user needed to create a device with one or few slow sectors for the
> > purpose of testing - all flushes would be forwarded to this device and
> > delayed, and that skews the test results. This patch allows to select 0
> > delay for flushes.
> > 
> > Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
> 
> The flush device shouldn't ever be allowed to be different than the
> write device should it?  Also, what does an offset even mean in the
> context of flush?

The flush device may be different if the user wants to suppress flushes 
(i.e. he could set the flush device to /dev/ram0, so that flushes are 
turned into nops).

> Pretty awkward really.  I get that you've factored out the ctr code and
> are just reusing it for flush; and that in practice these knobs won't
> get used (or flush_device won't be different than write_device).. but
> I'm just not following why we want to expose flush_offset and
> flush_device at all.
> 
> Mike

It's better to have the same arguments and same code paths for 
read/write/flush, then to invent new syntax just for flushes.

Mikulas




More information about the dm-devel mailing list