From: Christoph Hellwig Subject: Re: [PATCH] dm: allow a target to relax discard restrictions Date: Thu, 28 Apr 2011 04:41:17 -0400 Message-ID: <20110428084117.GA32658@infradead.org> References: <20110427150623.GC13487@infradead.org> <20110427151911.GF7294@redhat.com> <20110427215537.GA13386@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20110427215537.GA13386@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: Christoph Hellwig List-Id: dm-devel.ids On Wed, Apr 27, 2011 at 05:55:38PM -0400, Mike Snitzer wrote: > A target, like the upcoming thin provisioning target, may want to allow > discards even if the underlying devices do not support them natively. > > Signed-off-by: Mike Snitzer This would work, but I thing it's really confusing to have your new discards_supported flag in the dm_target structure in addition to the existing discards_supported in the dm_table and the num_discard_requests field there. May we should allow the target to set a tristate enum discard_enabled { NEVER, ALWAYS, PASSTHROUGH } to indicate it's discard support?