From patchwork Sun May 1 14:19:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihui Zhang X-Patchwork-Id: 8988901 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3FBA79F1D3 for ; Sun, 1 May 2016 14:19:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C781720253 for ; Sun, 1 May 2016 14:19:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFB8520121 for ; Sun, 1 May 2016 14:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751639AbcEAOTl (ORCPT ); Sun, 1 May 2016 10:19:41 -0400 Received: from mail-qg0-f66.google.com ([209.85.192.66]:33476 "EHLO mail-qg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbcEAOTk (ORCPT ); Sun, 1 May 2016 10:19:40 -0400 Received: by mail-qg0-f66.google.com with SMTP id 90so4328014qgz.0 for ; Sun, 01 May 2016 07:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=N6ku7vvfmIE4l7twt4pQTGZNfz5Z6eoi01S3GpYqDqc=; b=DhacVY1VAEQaYplqNIeyodNeZIz9bOca1+ASook+GTzP6YBNbBr3HRtdJ2mW/bIW71 dqaFyY8BBD/nhT9O0zPXjpbvGBYwCHzBVL0xQOD9cdpLsMczephzkE+xCjKdC4fd8zmR jDX3fmPbcJN+2T+8gc3XlVVnLvvYEMbVLmCVCcRlEhaoUAMyRs7JishasIziSh66fmjV lSa8Suwlaq+OE5JmII9CSiTEAJ061WRIO7ziteCYhZgqVHCt9+tBtFVgOBFHqq5JnQH6 pS1KO9TnqSAgpWUBxUkVI2sca/VwO/nelC0l+XvO/y5EiFqe4+l4KBL6yVE+lo7F1oya 5xvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N6ku7vvfmIE4l7twt4pQTGZNfz5Z6eoi01S3GpYqDqc=; b=iCt1efQg2dzYvSOgQIsChmUOiWkwBH+rS0IDJCu7KImd+HTSB1xteRnPJGtj3Bz3xn dq1KDQNf7QUkOKnbtUcGK3A6KPhWiQINveJH5pnQtsHWUN106RwcKp4lXLGGYTQTQi9y VPgavBDRehCFSmUaitFBCxNQ2g2QBUvKxCmgpSV2MoWRv43XjG+BAguZvOt/l5AUGr2l 9Ouf29xHo9i2Snhs7kTXlmBrPPMGZ7W1HM8ffRbsQf1OnkZe1iErEwdGDlcER2gtrZMK r8ocL3zLc3hC7pU4vjIAVKAVo51ijoTxXhoBPaUQ/tqC1GqB1wD5sruXdaqI6oAXgT0l KdKw== X-Gm-Message-State: AOPr4FWi0heLsRh/94BBZcM9ikljoGrltIqe/Q9ht6vM/IvGOgSLrM1uHNn/I1R8fGNpGg== X-Received: by 10.140.82.69 with SMTP id g63mr27621368qgd.106.1462112379811; Sun, 01 May 2016 07:19:39 -0700 (PDT) Received: from born-of-fire.psc.edu (born-of-fire.psc.edu. [128.182.168.68]) by smtp.gmail.com with ESMTPSA id t103sm7702204qge.26.2016.05.01.07.19.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 May 2016 07:19:38 -0700 (PDT) From: Zhihui Zhang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH] block: Rename cfq_dispatch_requests() to reflect exactly what it does Date: Sun, 1 May 2016 10:19:35 -0400 Message-Id: <1462112375-815-1-git-send-email-zzhsuny@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function used to dispatch _multiple_ requests per call, but it is no longer the case. Signed-off-by: Zhihui Zhang --- block/cfq-iosched.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4a34978..a8d634a 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3480,7 +3480,8 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq) * Dispatch a request from cfqq, moving them to the request queue * dispatch list. */ -static bool cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq) +static bool +__cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq) { struct request *rq; @@ -3515,7 +3516,7 @@ static bool cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq) * Find the cfqq that we need to service and move a request from that to the * dispatch list */ -static int cfq_dispatch_requests(struct request_queue *q, int force) +static int cfq_dispatch_request(struct request_queue *q, int force) { struct cfq_data *cfqd = q->elevator->elevator_data; struct cfq_queue *cfqq; @@ -3533,7 +3534,7 @@ static int cfq_dispatch_requests(struct request_queue *q, int force) /* * Dispatch a request from this cfqq, if it is allowed */ - if (!cfq_dispatch_request(cfqd, cfqq)) + if (!__cfq_dispatch_request(cfqd, cfqq)) return 0; cfqq->slice_dispatch++; @@ -4731,7 +4732,7 @@ static struct elevator_type iosched_cfq = { .elevator_merge_req_fn = cfq_merged_requests, .elevator_allow_merge_fn = cfq_allow_merge, .elevator_bio_merged_fn = cfq_bio_merged, - .elevator_dispatch_fn = cfq_dispatch_requests, + .elevator_dispatch_fn = cfq_dispatch_request, .elevator_add_req_fn = cfq_insert_request, .elevator_activate_req_fn = cfq_activate_request, .elevator_deactivate_req_fn = cfq_deactivate_request,