On Sun, 2020-04-19 at 09:19 -0400, Mike Snitzer wrote:

> You went overboard with implementation before checking to see if your
> work would be well received.
...
> I haven't looked closely at MD raid in this area but if you trully think
> underlying MD raid can cope with issuing discards to devices that don't
> support them (or that it avoids issuing them?) then please update
> dm-raid.c to conditionally set ti->discard_supported (if not all devices
> support discard).  That is how to inform DM core that the target knows
> better and it will manage discards issued to it.  It keeps the change
> local to dm-raid.c without the flag-day you're proposing.

So, now that I know that my approach to this was completely bogus,
what *is* the correct way to safely enable mixed-discard support?

It seems to me that the right way would be one of these options:

 * a sysfs toggle for the block layer
 * an lvchange based option for the dm layer

I'm leaning towards the latter for my personal use-case but the former
would make Linux much more flexible but would touch more code and have
the potential for more damage.

-- 
bye,
pabs

https://bonedaddy.net/pabs3/

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to