On Tue, 17 Apr 2018, Mike Snitzer wrote:

> On Mon, Apr 16 2018 at  6:33pm -0400,
> Mikulas Patocka <[email protected]> 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 <[email protected]>
> 
> 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

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to