Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbbERNUu (ORCPT ); Mon, 18 May 2015 09:20:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbbERNUm (ORCPT ); Mon, 18 May 2015 09:20:42 -0400 Date: Mon, 18 May 2015 09:20:40 -0400 From: Mike Snitzer To: Christoph Hellwig Cc: dm-devel@redhat.com, Jens Axboe , Chris Mason , Jan Kara , linux-kernel@vger.kernel.org Subject: Re: [PATCH for-4.2 01/14] block: remove management of bi_remaining when restoring original bi_end_io Message-ID: <20150518132040.GB13998@redhat.com> References: <1431637512-64245-1-git-send-email-snitzer@redhat.com> <1431637512-64245-2-git-send-email-snitzer@redhat.com> <20150518082439.GA5439@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150518082439.GA5439@infradead.org> 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 Content-Length: 1260 Lines: 26 On Mon, May 18 2015 at 4:24am -0400, Christoph Hellwig wrote: > In general this looks good. But as Jan mentioned you need to > clear BIO_CHAIN when bi_remaining reaches zero OK I just replied to Jan -- I'm not yet understanding why. That said, I also don't have a problem with doing what you guys are asking. I'd just like to understand the problem you're forseeing because in practice I'm not hitting it in testing. > and I'd really prefer if bio_inc_remaining wuld not be left exported > and folded into bio_chain so that we prevent new abuses from showing > up and keep the code centralized. Your desire to make bio_inc_remaining() private is noted but I think the proposed blkdev_issue_discard_async() is useful. In the context of DM thinp's use of blkdev_issue_discard_async(): yes it is (ab)using bio_chain() and bio_inc_remaining() to setup the async IO completion scheme but it makes for a pretty clean solution to the problem of wanting to have an async interface for discard. -- 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/