From patchwork Fri Nov 18 02:14:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 9435655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ADE8860469 for ; Fri, 18 Nov 2016 02:14:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97E61296FB for ; Fri, 18 Nov 2016 02:14:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8902429722; Fri, 18 Nov 2016 02:14:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EE6F296FB for ; Fri, 18 Nov 2016 02:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751020AbcKRCOb (ORCPT ); Thu, 17 Nov 2016 21:14:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:58437 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbcKRCOa (ORCPT ); Thu, 17 Nov 2016 21:14:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 18813AB03; Fri, 18 Nov 2016 02:14:27 +0000 (UTC) From: NeilBrown To: Jens Axboe , Christoph Hellwig Date: Fri, 18 Nov 2016 13:14:20 +1100 Cc: linux-block@vger.kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] block: call trace_block_split() from bio_split() User-Agent: Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-suse-linux-gnu) Message-ID: <87vavlfsar.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Somewhere around Commit: 20d0189b1012 ("block: Introduce new bio_split()") and Commit: 4b1faf931650 ("block: Kill bio_pair_split()") in 3.14 we lost the call to trace_block_split() from bio_split(). Commit: cda22646adaa ("block: add call to split trace point") in 4.5 added it back for blk_queue_split(), but not for other users of bio_split(), and particularly not for md/raid. This patch moves the trace_block_split() call from blk_queue_split() to bio_split(). As blk_queue_split() calls bio_split() (via various helper functions) the same events that were traced before will still be traced. Signed-off-by: NeilBrown Reviewed-by: Christoph Hellwig --- block/bio.c | 1 + block/blk-merge.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bio.c b/block/bio.c index db85c5753a76..212ea95a7401 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1804,6 +1804,7 @@ struct bio *bio_split(struct bio *bio, int sectors, bio_integrity_trim(split, 0, sectors); bio_advance(bio, split->bi_iter.bi_size); + trace_block_split(bdev_get_queue(bio->bi_bdev), split, bio->bi_iter.bi_sector); return split; } diff --git a/block/blk-merge.c b/block/blk-merge.c index 2642e5fc8b69..82cdd35a9f07 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -217,7 +217,6 @@ void blk_queue_split(struct request_queue *q, struct bio **bio, split->bi_opf |= REQ_NOMERGE; bio_chain(split, *bio); - trace_block_split(q, split, (*bio)->bi_iter.bi_sector); generic_make_request(*bio); *bio = split; }