From patchwork Fri Oct 13 23:35:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Lyle X-Patchwork-Id: 10006127 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 3FAAF60230 for ; Fri, 13 Oct 2017 23:36:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F94729009 for ; Fri, 13 Oct 2017 23:36:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D9AB2918E; Fri, 13 Oct 2017 23:36:12 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 C1C8829009 for ; Fri, 13 Oct 2017 23:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753010AbdJMXgJ (ORCPT ); Fri, 13 Oct 2017 19:36:09 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:47278 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238AbdJMXgG (ORCPT ); Fri, 13 Oct 2017 19:36:06 -0400 Received: by mail-pg0-f66.google.com with SMTP id r25so2338769pgn.4 for ; Fri, 13 Oct 2017 16:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyle-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UeBOvNtcQxDk1HplvyAUmwd1mN9TW/MP5SpoVP77uHI=; b=UilqqbcO2IUb5B4bTNUys0GMr4MuV8HXhrY690ZCJYOY2zCvkkdbBZWEZKDJu7CRr0 EsazsQI+4lrom8llFMRX+efEiewSp4ldyjSce6/GgsFKXkvJQmoYdESNZXZ68xn2IlQu xuUOeGonxynKdRj/walMo5OHeYjHzZ2ynG4hPRjF2L/wBo+Ys8vXMJ8nWe1ctyHmVrzw ugSgafrA6CC8apfsLgKT5k1ZdXsjeAEvwnwALRAxonVZVIiposFeSgFNYtMhouxixyOH s+67VpooMFwiuZ/5A2BCuwRr/+h0LRl9MGaNfBkLZUXxu1YHhrCdKJ+zppn+dVsnQmCu eUUQ== 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=UeBOvNtcQxDk1HplvyAUmwd1mN9TW/MP5SpoVP77uHI=; b=QZkmqel7ux7jFVXs6tI0IKNuW+9N00kj+Typu1svTJndAvPi6NYb7EeIS22hrKRnhT iavsr5iN62tL9CD3LFCTqHLA2tHDURKVSLgHQieLCY7xQjn7emNPTYsQkh2rdp+Z/vZM juru1ZgM3gCmiViHuX9lIDtAyIJeTCZY74Oc+ddyhAQOOo4X0pl0G3bJLttc0C1T41Ji H89n9PIedcRw9VPBw2FwUwOaNWLfveMi6oeARw1PAJ/wVRRGoWjZ7ntgp+V/Ux/qPqw6 lemrLQ5NesZ3UYoVWtWFdx6TQwVQLbCZvgBGHtwSw8nMMfk3pMJJcFz8Nq4+e8tJg9Ax 0vCQ== X-Gm-Message-State: AMCzsaWmHrT7Atc9gRXsODEDkVso4zwdzLeXJ5yNUlwKTVeZ4+5reChO X7wkkkT6ZLaXAo+HvQPaH/bMTg== X-Google-Smtp-Source: AOwi7QCZsHDL53tTTo+fQsb0PIjBlQRY8F0SQ2NgV4w+kOSrOZMPZOIXTrniZw6zX6azlYvBsWMo5Q== X-Received: by 10.84.246.133 with SMTP id m5mr2686346pll.53.1507937765990; Fri, 13 Oct 2017 16:36:05 -0700 (PDT) Received: from localhost.localdomain (68-189-67-104.dhcp.prtv.ca.charter.com. [68.189.67.104]) by smtp.gmail.com with ESMTPSA id 74sm4950718pft.184.2017.10.13.16.36.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 16:36:05 -0700 (PDT) From: Michael Lyle To: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org Cc: axboe@fb.com, Yijing Wang Subject: [PATCH 07/15] bcache: remove unused parameter Date: Fri, 13 Oct 2017 16:35:34 -0700 Message-Id: <20171013233542.20938-8-mlyle@lyle.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171013233542.20938-1-mlyle@lyle.org> References: <20171013233542.20938-1-mlyle@lyle.org> 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 From: Yijing Wang Parameter bio is no longer used, clean it. Signed-off-by: Yijing Wang Reviewed-by: Coly Li --- drivers/md/bcache/request.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 9ee137e8d387..163a17a80874 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -26,12 +26,12 @@ struct kmem_cache *bch_search_cache; static void bch_data_insert_start(struct closure *); -static unsigned cache_mode(struct cached_dev *dc, struct bio *bio) +static unsigned cache_mode(struct cached_dev *dc) { return BDEV_CACHE_MODE(&dc->sb); } -static bool verify(struct cached_dev *dc, struct bio *bio) +static bool verify(struct cached_dev *dc) { return dc->verify; } @@ -369,7 +369,7 @@ static struct hlist_head *iohash(struct cached_dev *dc, uint64_t k) static bool check_should_bypass(struct cached_dev *dc, struct bio *bio) { struct cache_set *c = dc->disk.c; - unsigned mode = cache_mode(dc, bio); + unsigned mode = cache_mode(dc); unsigned sectors, congested = bch_get_congested(c); struct task_struct *task = current; struct io *i; @@ -747,7 +747,7 @@ static void cached_dev_read_done(struct closure *cl) s->cache_miss = NULL; } - if (verify(dc, &s->bio.bio) && s->recoverable && !s->read_dirty_data) + if (verify(dc) && s->recoverable && !s->read_dirty_data) bch_data_verify(dc, s->orig_bio); bio_complete(s); @@ -772,7 +772,7 @@ static void cached_dev_read_done_bh(struct closure *cl) if (s->iop.status) continue_at_nobarrier(cl, cached_dev_read_error, bcache_wq); - else if (s->iop.bio || verify(dc, &s->bio.bio)) + else if (s->iop.bio || verify(dc)) continue_at_nobarrier(cl, cached_dev_read_done, bcache_wq); else continue_at_nobarrier(cl, cached_dev_bio_complete, NULL); @@ -899,7 +899,7 @@ static void cached_dev_write(struct cached_dev *dc, struct search *s) s->iop.bypass = true; if (should_writeback(dc, s->orig_bio, - cache_mode(dc, bio), + cache_mode(dc), s->iop.bypass)) { s->iop.bypass = false; s->iop.writeback = true;