From patchwork Thu Oct 25 21:10:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656587 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 7258F15A7 for ; Thu, 25 Oct 2018 21:11:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 635CD2C648 for ; Thu, 25 Oct 2018 21:11:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 577D52C64C; Thu, 25 Oct 2018 21:11:42 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 0756B2C652 for ; Thu, 25 Oct 2018 21:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbeJZFp7 (ORCPT ); Fri, 26 Oct 2018 01:45:59 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:36707 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeJZFp6 (ORCPT ); Fri, 26 Oct 2018 01:45:58 -0400 Received: by mail-it1-f194.google.com with SMTP id h14-v6so3632038itf.1 for ; Thu, 25 Oct 2018 14:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/vYx+4HwhlHgM56nJ1gOfckQ6BdZmCnlgV89L5QOSZk=; b=rEz8XVgieiGpw3IYEA0CehycP/AzMMVXy1jAobXa3/HY8ymPDTMR7p+Abwvbju8fDn EW0oW+h2iShvThsqmbmtoDA/+TvhdaQB0xWI8Edm3k81suL28K5BkzRYiy9vQ13Z0Qi7 r/iiK3SrjZoBAdtf6HtHb1mo7eSFANsWyUr2phGAQlnmqjwRgju8BZrh9/fPNjyTwmLK Tfb/xptMSiBfYA9Yg4O2MYaypKrvLyzKSORQZqZsgOgGtQlE4qKZbh2KdAemrKYvkLOO Lyr1vEmqdfpIBRLk/zSmF2sYk+pfzrYqSzQEw8tV+QQTxdiwjm9r4J6qY5vMSBA31t6M WB9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/vYx+4HwhlHgM56nJ1gOfckQ6BdZmCnlgV89L5QOSZk=; b=gGBGQcRHrBbYbvXFgu0IbuLGY80/IZoVQrwd2PcKZbbz0a0dbYKKfFuvb/Fsfm7w9e IBG1nlEEK4Kcuw8mdgs9sIokRFyjk8v7FzeDo0Zzvr4HPCuYXcs19V2uAn5K7/J0Jsp2 6x12CNGQnhwII6Vbju64n3P+AFLNTcAEXBnyWhfbldhZIrkHws366ghn+6ClGA+IBbPT YF3hwDugmKAXh4pfOBgnoK8IACyFxiEV3vDVr6OMm/VJrSfwtLvW+AHkhOkAyYC8JgcH RxFS7QGvoZtAcxz7RFXqIu5H/kpqsPy2oVbGfCXJEAFf1UcaJsY8np+1rQ2WEKqTA+Cx Tjdw== X-Gm-Message-State: AGRZ1gLC5IkMnFTs+qq+ZP62DXWRD7jNVoku5dxPVpTIsaNpzsbayS7F ePXNF/cX49hGYP7P8F1bZgkSVrliGWyI6Q== X-Google-Smtp-Source: AJdET5cxk7yixWX5Jn5egqV0Mc1VxFF9PNU1ZwN22nACW0QAhMXu4NY5aruEO7eMDO1jg07FRRMptg== X-Received: by 2002:a02:590:: with SMTP id 16-v6mr698485jal.70.1540501899330; Thu, 25 Oct 2018 14:11:39 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e65-v6sm3446375ioa.76.2018.10.25.14.11.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:11:38 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 26/28] block: remove req_no_special_merge() from merging code Date: Thu, 25 Oct 2018 15:10:37 -0600 Message-Id: <20181025211039.11559-27-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025211039.11559-1-axboe@kernel.dk> References: <20181025211039.11559-1-axboe@kernel.dk> 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 It'll always be false at this point, just remove it. Signed-off-by: Jens Axboe Reviewed-by: Hannes Reinecke --- block/blk-merge.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 7fedc0391610..3561dcce2260 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -595,17 +595,6 @@ int ll_front_merge_fn(struct request_queue *q, struct request *req, return ll_new_hw_segment(q, req, bio); } -/* - * blk-mq uses req->special to carry normal driver per-request payload, it - * does not indicate a prepared command that we cannot merge with. - */ -static bool req_no_special_merge(struct request *req) -{ - struct request_queue *q = req->q; - - return !q->mq_ops && req->special; -} - static bool req_attempt_discard_merge(struct request_queue *q, struct request *req, struct request *next) { @@ -631,13 +620,6 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req, unsigned int seg_size = req->biotail->bi_seg_back_size + next->bio->bi_seg_front_size; - /* - * First check if the either of the requests are re-queued - * requests. Can't merge them if they are. - */ - if (req_no_special_merge(req) || req_no_special_merge(next)) - return 0; - if (req_gap_back_merge(req, next->bio)) return 0; @@ -738,8 +720,7 @@ static struct request *attempt_merge(struct request_queue *q, return NULL; if (rq_data_dir(req) != rq_data_dir(next) - || req->rq_disk != next->rq_disk - || req_no_special_merge(next)) + || req->rq_disk != next->rq_disk) return NULL; if (req_op(req) == REQ_OP_WRITE_SAME && @@ -858,8 +839,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio) if (bio_data_dir(bio) != rq_data_dir(rq)) return false; - /* must be same device and not a special request */ - if (rq->rq_disk != bio->bi_disk || req_no_special_merge(rq)) + /* must be same device */ + if (rq->rq_disk != bio->bi_disk) return false; /* only merge integrity protected bio into ditto rq */