Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp181360pxv; Thu, 24 Jun 2021 05:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSftUXmQ72KuenWezov4jfRwCgrvT5+FjfZp7hHTLzCEevLASn+orZdnV6yksCCNFa5TCm X-Received: by 2002:a17:906:4d99:: with SMTP id s25mr2216316eju.349.1624538742717; Thu, 24 Jun 2021 05:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624538742; cv=none; d=google.com; s=arc-20160816; b=KqP17jWqKfkroGQ0PpZ7gBROoBKTbUQFl9rdCDK22TGkxdVoHqhNO6PrX5xRLIeu2B kkokuvHWKt47pnSJ9S+HjZOnLTxKxVDKBHs2lmArswgB8p6m5V1P35SGO/qqjZ2GfeAE L4XnDLlDLhNoFo6c1T+bTJKyIdkbDYy7pMTABWfMzZjfm83t8P/dERuLkiqXtsKKvWHK 0bxnvYUMvciUPvyIWuKdc0deP2NHdl6KVdGkRHzQGSOEoGW16qhen58lw0t2kPZp0x6y 9Qeb+e4X8hA88mr0MfJM2gDyyJ/2OkE0tkU2uEQws48btc9Beln4ZMnW2cp8sjq4s+Lm 0bfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NN6FKb8fPaN7gGJFuuyURG3SMUtb7yV2e8j5LT6i1CA=; b=gqCt8Y8qnrB6eCGlnr2LOaFeFkSQc3x+2TpbfOm94aSoHZld4rSb1Sc5lPDcDLdk4B 4QRPUbll7eEq61+nLRS4P6T9tCgG9pGj9IMg4cX3UnVDxzQyVCxWZH9Kie2tIs0Hm2hf uOGPiBfTmUYjGk+ZCrqqPX86N51ZdsBfV/zWinvxdTUQepnhNlnjqAf2GJ/8HrDZLJ/T UmhUAvU0HoC2Ar5wndPyzsG1ODcjlWtkUc2bZ5GeIqFi+AR2OBgXiOhPnD8VhYEHACD9 mz3MKCG4Uml+rK5phgU57nwNmyjT/2xHx9CjWow3xsy9ggw7MJJvOa8OpuGchqF+4zLr EETw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="c73U/Jn9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si3176540edd.361.2021.06.24.05.45.18; Thu, 24 Jun 2021 05:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="c73U/Jn9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231803AbhFXMnZ (ORCPT + 99 others); Thu, 24 Jun 2021 08:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbhFXMnY (ORCPT ); Thu, 24 Jun 2021 08:43:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA061C061574; Thu, 24 Jun 2021 05:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NN6FKb8fPaN7gGJFuuyURG3SMUtb7yV2e8j5LT6i1CA=; b=c73U/Jn9nmNnoFXgk5w0aPdcCG BftiYykBW+yTTr9GVDRoqPOJXM9Zi/Hp79OKPUXvlXzLhkOThVq6pJtp7aNR0J/ioGrbmfC/5SaXS /RA8W7h12lyJL3deQi/Lo18qODhdfGbm0Ws8fPUEQZADgrtyW7gOmUNhodxcRXhN2y+P138gYnIgZ DU/3J6U/m4ls2hVy+1xrW0BMF49OMtRVqzK5j/6m2VxNbRRO5sDTd/SuxD/1jIDVCcjpUcxx9b4Vp OXqDAM2dIS/X1IDZlueT5Q2FP6+jHHJeYoIsg5VSc9+KVqvyqhM+WoCnHhPiBBa7KVSPyCUx6J0MQ ue94sXuQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwOeJ-00GZlL-PY; Thu, 24 Jun 2021 12:40:14 +0000 Date: Thu, 24 Jun 2021 13:40:03 +0100 From: Christoph Hellwig To: edwardh Cc: axboe@kernel.dk, neilb@suse.com, hch@infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, s3t@synology.com, bingjingc@synology.com, cccheng@synology.com, Wade Liang Subject: Re: [PATCH v4] block: fix trace completion for chained bio Message-ID: References: <20210624123030.27014-1-edwardh@synology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210624123030.27014-1-edwardh@synology.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 24, 2021 at 08:30:30PM +0800, edwardh wrote: > From: Edward Hsieh > > For chained bio, trace_block_bio_complete in bio_endio is currently called > only by the parent bio once upon all chained bio completed. > However, the sector and size for the parent bio are modified in bio_split. > Therefore, the size and sector of the complete events might not match the > queue events in blktrace. > > The original fix of bio completion trace ("block: trace > completion of all bios.") wants multiple complete events to correspond > to one queue event but missed this. > > The issue can be reproduced by md/raid5 read with bio cross chunks. > > To fix, move trace completion into the loop for every chained bio to call. > > Fixes: fbbaf700e7b1 ("block: trace completion of all bios.") > Reviewed-by: Wade Liang > Reviewed-by: BingJing Chang > Signed-off-by: Edward Hsieh Looks good, Reviewed-by: Christoph Hellwig