[dm-devel] [PATCH, RFC] dm: relax discard restrictions

Mike Snitzer snitzer at redhat.com
Wed Apr 27 15:19:11 UTC 2011


On Wed, Apr 27 2011 at 11:06am -0400,
Christoph Hellwig <hch at infradead.org> wrote:

> With targets like dm-thinp we might want to allow discard even if the
> underlying devices don't support them natively.  This patch is the
> extreme variant of not restricting discard support at all, but maybe
> there are other options.  Or maybe we should keep the old
> dm_table_supports_discards function as a helper for targets that
> want simple discard passthrough?

I think we could accomplish the same by adding a target override flag
(e.g. ti->discards_supported) that enables dm_table_supports_discards()
to short-circuit device_discard_capable's native discard checking.

Mike




More information about the dm-devel mailing list