From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH v2] dm table: simplify discard support processing Date: Mon, 18 Jul 2011 11:10:56 -0400 Message-ID: <20110718151055.GA7744@redhat.com> References: <20110714143037.GA12049@redhat.com> <20110714175647.GA31051@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: <20110714175647.GA31051@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: agk@redhat.com, dm-devel@redhat.com Cc: Milan Broz List-Id: dm-devel.ids Updated patch header to also point out the fix: Remove 'discards_supported' from the dm_table structure. The same information can be easily discovered from the table's target(s) in dm_table_supports_discards(). This change fixes an issue with per-target 'discards_supported' being ineffective, at insuring the final DM device advertises discard support, due to a different target not having 'num_discard_requests' > 0 -- this resulted in the overall table's 'discards_supported' being set to 0. Also DMWARN if a target sets 'discards_supported' override but forgets to set 'num_discard_requests'.