Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbbERI2G (ORCPT ); Mon, 18 May 2015 04:28:06 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60123 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750958AbbERI15 (ORCPT ); Mon, 18 May 2015 04:27:57 -0400 Date: Mon, 18 May 2015 01:27:56 -0700 From: Christoph Hellwig To: Mike Snitzer Cc: dm-devel@redhat.com, Jens Axboe , Joe Thornber , linux-kernel@vger.kernel.org Subject: Re: [dm-devel] [PATCH for-4.2 04/14] block: factor out blkdev_issue_discard_async Message-ID: <20150518082756.GB5439@infradead.org> References: <1431637512-64245-1-git-send-email-snitzer@redhat.com> <1431637512-64245-5-git-send-email-snitzer@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431637512-64245-5-git-send-email-snitzer@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 22 On Thu, May 14, 2015 at 05:05:02PM -0400, Mike Snitzer wrote: > From: Joe Thornber > > Useful for callers who wish to manage the async completion of discard(s) > without explicitly blocking waiting for completion. > > blkdev_issue_discard() is updated to call blkdev_issue_discard_async() > and DM thinp will make use of blkdev_issue_discard_async() in the > upcoming "dm thin: range discard support" commit. I think this is the wrong level of interface. I think dm should just submit the bios directly, which will also allow it to use bio_chain properly instead of needing the inc_remaining hack. Instead export helpers that properly split up the discard chunk sectors without touching the bio itself. And with bio split on demand work even that will hopefully go away soon. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/