From patchwork Sat Jan 19 18:05:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Snitzer X-Patchwork-Id: 10772105 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50E856C5 for ; Sat, 19 Jan 2019 18:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42B8028AF5 for ; Sat, 19 Jan 2019 18:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36BDB29A99; Sat, 19 Jan 2019 18:05:30 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D789528AF5 for ; Sat, 19 Jan 2019 18:05:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67507C0C0549; Sat, 19 Jan 2019 18:05:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 20128607DD; Sat, 19 Jan 2019 18:05:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 79AB43F7D0; Sat, 19 Jan 2019 18:05:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0JI5QBa019303 for ; Sat, 19 Jan 2019 13:05:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1A86C600D7; Sat, 19 Jan 2019 18:05:26 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29D2D600D6; Sat, 19 Jan 2019 18:05:16 +0000 (UTC) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F028050452; Sat, 19 Jan 2019 18:05:15 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id e5so18754853qtr.12; Sat, 19 Jan 2019 10:05:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xam2qz/iGZ2SU9NuNxXD/C9OzO4f5Xq2vH+9/0d7tVw=; b=UkL0pU3tdzXtytpB3DbrJUcKw/8NxBnYXSpmwtXHHh0R4iL2Mx9RB5RYDYSJeeCRYy 3PslZyC4PMF716nTYbe1Tn+g6qC0aEBvMXcqw0GK/XkfKtDcY18OzCKMWqh3PwHmhuqS TIHekK7rGpTZMec2AAHYutFl2Rz7+CZomjgwujekSWl3WBCiIUmuYEndnKlGoVx3uZrO m4GNBXvK39bm8YvGWyRZT7PRtXuO7qndG1/KWaiKyKxfZMI/F3aEPRntgLsAaayDvA5v hfNK6yHfFk5IirSOi3sxJRsJNZVfxKs9OHdc/tCx+yeP7FXx86pVPVNzdSAqPdvHZOlC jvoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Xam2qz/iGZ2SU9NuNxXD/C9OzO4f5Xq2vH+9/0d7tVw=; b=R1fkcOVMtS4sb5zn+Zd7h3sYvqKK3hu9e+9AXTPInyyYGdCslLWfGnB+lrlgKV1Qp3 UUYrIR+ijlvTwuC4kAepQMVqsP+OCtocmMb1M8sKycWbhRLt/fTzBgUvmQRChcIuPybY F4wo5GnXcnmdwtZmMEdg/pG4whazfhp4yuZEnNBDFaw1VzAl62SdGXNj3hfq4fIfMykV jBrDWSaiUdBY1/SynI0VFbQWigq5w2RS2Ty3DiQ4vSmSrGQrGxW814S5Ou8hEO6YhyZW sTB90rV+VW5appCM5jvZXf+G3bS2XrfiiIzNoOalTbEj/V5bs/UVpIRA/AxPUIU7VqDt QtBA== X-Gm-Message-State: AJcUukfaRnw/rDb38t0Olt11z+9jX6m02BNwaLGj/xyBAd6LZlm8Gmep MfFFN7aYkXKGECGLO+hqgIJLHFAd X-Google-Smtp-Source: ALg8bN7yTv8YKdR7o1QnjRohywutXXp77B/qhQzlxPgyK/2Y/13Afm3nB5navmTvsFkD8HTFqOhXlA== X-Received: by 2002:aed:3b76:: with SMTP id q51mr20739358qte.229.1547921114718; Sat, 19 Jan 2019 10:05:14 -0800 (PST) Received: from localhost (pool-68-160-176-113.bstnma.fios.verizon.net. [68.160.176.113]) by smtp.gmail.com with ESMTPSA id o21sm64275035qto.18.2019.01.19.10.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Jan 2019 10:05:13 -0800 (PST) From: Mike Snitzer To: dm-devel@redhat.com Date: Sat, 19 Jan 2019 13:05:05 -0500 Message-Id: <20190119180506.1300-4-snitzer@redhat.com> In-Reply-To: <20190119180506.1300-1-snitzer@redhat.com> References: <20190119180506.1300-1-snitzer@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 19 Jan 2019 18:05:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 19 Jan 2019 18:05:16 +0000 (UTC) for IP:'209.85.160.196' DOMAIN:'mail-qt1-f196.google.com' HELO:'mail-qt1-f196.google.com' FROM:'snitzer@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.006 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.196 mail-qt1-f196.google.com 209.85.160.196 mail-qt1-f196.google.com X-RedHat-Possible-Forgery: Mike Snitzer X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: dm-devel@redhat.com Cc: axboe@kernel.dk, linux-block@vger.kernel.org, NeilBrown , Ming Lei Subject: [dm-devel] [PATCH 3/4] dm: fix missing bio_split() pattern code in __split_and_process_bio() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 19 Jan 2019 18:05:29 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Use the same BIO_QUEUE_ENTERED pattern that was established by commit cd4a4ae4683dc ("block: don't use blocking queue entered for recursive bio submits") by setting BIO_QUEUE_ENTERED after bio_split() and before recursing via generic_make_request(). Also add trace_block_split() because it provides useful context about bio splits in blktrace. Depends-on: cd4a4ae4683dc ("block: don't use blocking queue entered for recursive bio submits") Fixes: 18a25da84354 ("dm: ensure bio submission follows a depth-first tree walk") Cc: stable@vger.kernel.org # 4.16+ Signed-off-by: Mike Snitzer Signed-off-by: Mike Snitzer --- drivers/md/dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index fbadda68e23b..6e29c2d99b99 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1654,7 +1654,9 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, sectors[op_stat_group(bio_op(bio))], ci.sector_count); part_stat_unlock(); + bio_set_flag(bio, BIO_QUEUE_ENTERED); bio_chain(b, bio); + trace_block_split(md->queue, b, bio->bi_iter.bi_sector); ret = generic_make_request(bio); break; }