From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933543AbbHKCmC (ORCPT ); Mon, 10 Aug 2015 22:42:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53195 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933306AbbHKCl6 (ORCPT ); Mon, 10 Aug 2015 22:41:58 -0400 Date: Mon, 10 Aug 2015 22:41:55 -0400 From: Mike Snitzer To: "Martin K. Petersen" Cc: Ming Lin , axboe@fb.com, Christoph Hellwig , device-mapper development , Ming Lei , Christoph Hellwig , Alasdair Kergon , Lars Ellenberg , Philip Kelleher , Kent Overstreet , Nitin Gupta , Ming Lin , Oleg Drokin , Al Viro , Jens Axboe , Andreas Dilger , Geoff Levand , Jiri Kosina , lkml , Jim Paris , Minchan Kim , Dongsu Park , drbd-user@lists.linbit.com, Joe Thornber Subject: Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios Message-ID: <20150811024154.GA26351@redhat.com> References: <1439099990.7880.0.camel@hasee> <20150809064128.GB2436@infradead.org> <1439103347.7880.3.camel@hasee> <20150809070128.GA25739@infradead.org> <1439104707.7880.8.camel@hasee> <20150810150216.GA22719@redhat.com> <1439230696.26458.6.camel@ssi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen wrote: > >>>>> "Ming" == Ming Lin writes: > > Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? > > Ming> But that doesn't work for dm-thinp. See Kent's suggestion to use > Ming> 1<<31. > > I'm not sure why things are not working for dm-thinp. Presumably Kent's > code would split the discard at a granularity boundary so why would that > cause problems for dm? DM-thinp processes discards internally before it passes them down (if configured to do so). If a discard is smaller than the granularity of a thinp block (whose size is configurable) or if the start and end of the discard's extent is misaligned (relative to the thinp blocks mapped to the logical extent) then the discard won't actually discard partial thinp blocks. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios Date: Mon, 10 Aug 2015 22:41:55 -0400 Message-ID: <20150811024154.GA26351@redhat.com> References: <1439099990.7880.0.camel@hasee> <20150809064128.GB2436@infradead.org> <1439103347.7880.3.camel@hasee> <20150809070128.GA25739@infradead.org> <1439104707.7880.8.camel@hasee> <20150810150216.GA22719@redhat.com> <1439230696.26458.6.camel@ssi> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org Errors-To: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org To: "Martin K. Petersen" Cc: Ming Lei , device-mapper development , Christoph Hellwig , Alasdair Kergon , Lars Ellenberg , Philip Kelleher , Christoph Hellwig , Kent Overstreet , Nitin Gupta , Ming Lin , Oleg Drokin , Al Viro , Ming Lin , Jens Axboe , axboe-b10kYP2dOMg@public.gmane.org, Andreas Dilger , Geoff Levand , Jiri Kosina , lkml , Jim Paris , Minchan Kim , Joe Thornber , Dongsu Park , drbd-user-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: dm-devel.ids On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen wrote: > >>>>> "Ming" == Ming Lin writes: > > Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? > > Ming> But that doesn't work for dm-thinp. See Kent's suggestion to use > Ming> 1<<31. > > I'm not sure why things are not working for dm-thinp. Presumably Kent's > code would split the discard at a granularity boundary so why would that > cause problems for dm? DM-thinp processes discards internally before it passes them down (if configured to do so). If a discard is smaller than the granularity of a thinp block (whose size is configurable) or if the start and end of the discard's extent is misaligned (relative to the thinp blocks mapped to the logical extent) then the discard won't actually discard partial thinp blocks.