From patchwork Tue Oct 9 11:12:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10632285 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 4040F112B for ; Tue, 9 Oct 2018 11:16:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20C6728A5E for ; Tue, 9 Oct 2018 11:16:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14E7428A6F; Tue, 9 Oct 2018 11:16: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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 D5CA928A5E for ; Tue, 9 Oct 2018 11:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbeJISbu (ORCPT ); Tue, 9 Oct 2018 14:31:50 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37313 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbeJISbt (ORCPT ); Tue, 9 Oct 2018 14:31:49 -0400 Received: by mail-pf1-f195.google.com with SMTP id j23-v6so680552pfi.4 for ; Tue, 09 Oct 2018 04:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h9I+TPvf6SCw26SBDSlzBDvl3jcORMV7eF6pAF/YpLQ=; b=mERJpbIYAbI7Vm5L8i/qB8Ot8t6Uv6+CTGbTWuX8Xj3ERhhAG9mPpR0dayeZ8tid+E 2o9+gwJaOfCeAemWpQODRrBQxdjjvwjlLR6o+o+GgdcBMf2KABIjf9y4o0ECeZm2Atl/ qOaK28Wg0VFxi+m8fvNTNdokJlgrjQLzNeqdi8540ES78W2y05eTqufCKT6ztl+KpMhH faDVeX40JshVWeX2/hvKlozd81gfEidHfDtmf+XiE/QBWWKHN2rGkRt4tPHsf01zyvgE bsl5a34+5K+KzRJ1rOWSGAvt56t74QL+C8LBdkiwdMzabiVqGyNr/iZK+WuOY7iFlrAl fBFA== 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:mime-version:content-transfer-encoding; bh=h9I+TPvf6SCw26SBDSlzBDvl3jcORMV7eF6pAF/YpLQ=; b=axUxGgnIG8jnIZp/G+ALcXOFcth9Vs7uOeQQiNkEh9D8jbqbyVJZOYWcSCOM1uHahh rcsAFtyfjpzq6SVX3wF3eUGkOPYZJ6I+n3fSDGbXAQiL8oGRa9SSzpwQPOgQdiqS6Dvb 9F96psvyLG8rmrSvILhCZUt9c1eOF/DLfzG/9Hab8rzDaRl3v+7NkUBQNzxxnuL+z4DU c7orjupjgDs78CLYIyqrMVwn/nuCMEKhqbtOq8wkQJKzyehqtc72V09xV3PWA2UBfvyn XiDEc5kH2Q3649XD+OG1UF8pcaNqou4zFoJGXyxFNj1Oec+JlfnDAV7sln6JO8a55O0d oOag== X-Gm-Message-State: ABuFfohNmMzx6r/5Pu+aFSU7Jfqt0v8NOKz10q9oZd1DePF6S8z+g4ED /v5RZILhi1JSJq9o4T4XIp+6wA== X-Google-Smtp-Source: ACcGV61etT9glLrTQfEDerHFNJewp73x4LXN4wAoK0zwPP9dwr7iCA2L9z5HG0bmDQG2A0xto8xsFQ== X-Received: by 2002:aa7:8715:: with SMTP id b21-v6mr29328349pfo.250.1539083722805; Tue, 09 Oct 2018 04:15:22 -0700 (PDT) Received: from skyninja.hgst.com (rap-us.hgst.com. [199.255.44.250]) by smtp.gmail.com with ESMTPSA id p1-v6sm25342380pff.128.2018.10.09.04.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 04:15:21 -0700 (PDT) From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jav?= =?utf-8?q?ier_Gonz=C3=A1lez?= , =?utf-8?q?Javier_Gonz?= =?utf-8?q?=C3=A1lez?= , =?utf-8?q?Matias_Bj=C3=B8rling?= Subject: [GIT PULL 38/45] lightnvm: pblk: remove unused function Date: Tue, 9 Oct 2018 13:12:08 +0200 Message-Id: <20181009111215.7653-39-mb@lightnvm.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181009111215.7653-1-mb@lightnvm.io> References: <20181009111215.7653-1-mb@lightnvm.io> MIME-Version: 1.0 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: Javier González Removed unused function in pblk-rb.c Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-rb.c | 26 -------------------------- drivers/lightnvm/pblk.h | 2 -- 2 files changed, 28 deletions(-) diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index c26eab2ba8bd..82829e8151db 100644 --- a/drivers/lightnvm/pblk-rb.c +++ b/drivers/lightnvm/pblk-rb.c @@ -729,32 +729,6 @@ unsigned int pblk_rb_flush_point_count(struct pblk_rb *rb) return (submitted < to_flush) ? (to_flush - submitted) : 0; } -/* - * Scan from the current position of the sync pointer to find the entry that - * corresponds to the given ppa. This is necessary since write requests can be - * completed out of order. The assumption is that the ppa is close to the sync - * pointer thus the search will not take long. - * - * The caller of this function must guarantee that the sync pointer will no - * reach the entry while it is using the metadata associated with it. With this - * assumption in mind, there is no need to take the sync lock. - */ -struct pblk_rb_entry *pblk_rb_sync_scan_entry(struct pblk_rb *rb, - struct ppa_addr *ppa) -{ - unsigned int sync, subm, count; - unsigned int i; - - sync = READ_ONCE(rb->sync); - subm = READ_ONCE(rb->subm); - count = pblk_rb_ring_count(subm, sync, rb->nr_entries); - - for (i = 0; i < count; i++) - sync = (sync + 1) & (rb->nr_entries - 1); - - return NULL; -} - int pblk_rb_tear_down_check(struct pblk_rb *rb) { struct pblk_rb_entry *entry; diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index e710f6db2a35..22586b78198a 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h @@ -760,8 +760,6 @@ unsigned int pblk_rb_read_commit(struct pblk_rb *rb, unsigned int entries); unsigned int pblk_rb_sync_init(struct pblk_rb *rb, unsigned long *flags); unsigned int pblk_rb_sync_advance(struct pblk_rb *rb, unsigned int nr_entries); -struct pblk_rb_entry *pblk_rb_sync_scan_entry(struct pblk_rb *rb, - struct ppa_addr *ppa); void pblk_rb_sync_end(struct pblk_rb *rb, unsigned long *flags); unsigned int pblk_rb_flush_point_count(struct pblk_rb *rb);