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: 10066763 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 0BB81603FA for ; Mon, 20 Nov 2017 16:54:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2682292E3 for ; Mon, 20 Nov 2017 16:54:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E421129439; Mon, 20 Nov 2017 16:54:07 +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 vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EBE229434 for ; Mon, 20 Nov 2017 16:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751641AbdKTQyH (ORCPT ); Mon, 20 Nov 2017 11:54:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33568 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbdKTQyG (ORCPT ); Mon, 20 Nov 2017 11:54:06 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87FEAC058EB3; Mon, 20 Nov 2017 16:54:06 +0000 (UTC) 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 Cc: linux-block@vger.kernel.org, dm-devel@redhat.com Subject: [PATCH] block: early return from blk_queue_split() if q->bio_split is NULL 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 20 Nov 2017 16:54:06 +0000 (UTC) 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 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: