Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934415AbdCVMwK (ORCPT ); Wed, 22 Mar 2017 08:52:10 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:57573 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934150AbdCVMvv (ORCPT ); Wed, 22 Mar 2017 08:51:51 -0400 Date: Wed, 22 Mar 2017 05:51:49 -0700 From: Christoph Hellwig To: NeilBrown Cc: Jens Axboe , linux-block@vger.kernel.org, linux-raid@vger.kernel.org, dm-devel@redhat.com, Alasdair Kergon , Mike Snitzer , Shaohua Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: trace completion of all bios. Message-ID: <20170322125149.GA29606@infradead.org> References: <877f3iave6.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877f3iave6.fsf@notabene.neil.brown.name> User-Agent: Mutt/1.7.1 (2016-10-04) 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: 517 Lines: 12 On Wed, Mar 22, 2017 at 01:38:09PM +1100, NeilBrown wrote: > > Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). > Now that we have bio_chain(), it is not possible, in general, for a > driver to know when the bio is really complete. Only bio_endio() > knows that. > > So move the trace_block_bio_complete() call to bio_endio(). This will cause duplicate events for request based drivers. You'll need to have a bio_endio_notrace or similar without that the request completion path can call.