From patchwork Mon Nov 20 16:54:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Snitzer X-Patchwork-Id: 10066765 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.web.codeaurora.org (Postfix) with ESMTP id 9CC9F603FA for ; Mon, 20 Nov 2017 16:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E91829431 for ; Mon, 20 Nov 2017 16:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8389029435; Mon, 20 Nov 2017 16:54:09 +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 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 4694729434 for ; Mon, 20 Nov 2017 16:54:09 +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 84E3D3E7F5; Mon, 20 Nov 2017 16:54:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38CB34DC50; Mon, 20 Nov 2017 16:54:08 +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 DF19F1800BD3; Mon, 20 Nov 2017 16:54:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAKGs6p8018381 for ; Mon, 20 Nov 2017 11:54:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 863AF60BEC; Mon, 20 Nov 2017 16:54:06 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1ED060BE5; Mon, 20 Nov 2017 16:54:03 +0000 (UTC) Date: Mon, 20 Nov 2017 11:54:02 -0500 From: Mike Snitzer To: axboe@kernel.dk Message-ID: <20171120165401.GA10608@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: linux-block@vger.kernel.org, dm-devel@redhat.com Subject: [dm-devel] [PATCH] block: early return from blk_queue_split() if q->bio_split is NULL 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: , 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.25]); Mon, 20 Nov 2017 16:54:08 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP DM appears to be the only block driver that doesn't lean on the block core's bio splitting. My hope is to fix that but in the meantime it doesn't make sense for a device that doesn't need blk_queue_split() to go through the associated work. Signed-off-by: Mike Snitzer --- block/blk-merge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-merge.c b/block/blk-merge.c index f5dedd5..212004c 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -186,6 +186,9 @@ void blk_queue_split(struct request_queue *q, struct bio **bio) struct bio *split, *res; unsigned nsegs; + if (!q->bio_split) + return; + switch (bio_op(*bio)) { case REQ_OP_DISCARD: case REQ_OP_SECURE_ERASE: