From patchwork Wed Jun 29 14:41:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9205473 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 CE97E607D8 for ; Wed, 29 Jun 2016 14:43:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1E012866A for ; Wed, 29 Jun 2016 14:43:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6CCD2866C; Wed, 29 Jun 2016 14:43:14 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 47DBD2866A for ; Wed, 29 Jun 2016 14:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997AbcF2OnN (ORCPT ); Wed, 29 Jun 2016 10:43:13 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35368 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbcF2OmX (ORCPT ); Wed, 29 Jun 2016 10:42:23 -0400 Received: by mail-wm0-f67.google.com with SMTP id a66so14846963wme.2 for ; Wed, 29 Jun 2016 07:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1ZW00aSJR4TYpF2Y5gYDlLPt/PeNc6Kaw2ik/M7nbyY=; b=RRajHvollk3IcrRJiZamy1s8CmKKk9HXYTATCIzOWNo5Wb/a1wdkXxWHG+4Yk1NDus YS0bEEQIoPyF1w/sHLOKR0SZtnB6c+HulvWpNSlculQzpyN0oELQjE9ocazm1+npDdv2 w2oskVUlTrTLsANTvp3CpoDE1KW3J06LXrvkI= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=1ZW00aSJR4TYpF2Y5gYDlLPt/PeNc6Kaw2ik/M7nbyY=; b=QFI8KaZnlReul5IE9TS+AilmQrDYu0yxUBAsNKzwt29iJxLE0GqgSDUuFtZNCQZRiq 6m3RpV2oyvNZYU5SDdL6o2aW6NG4V4/r7A6/D/lYLunLqYbAUjzNicDFD2SOXLjPBZhW 9LZpzA4vXpidYbI1jumIR4PYQF61zC73DNiCx4JGYu+CWIufRgH4oJxEZ/y6Vu3qKjUl kguziW5iJThF7QmZr1OblwRd9qZr3uQJ48Pa/w7n2yz4NK1Ood/wqMDn7PyXUaD5fQEh KSWcrCwHzuZyDUS4hEPJ9VoOCin2m/dPGW/GI+UOHJw8NtmcSxlv2BzAZZulhiPMSii7 urBQ== X-Gm-Message-State: ALyK8tLH3ig6HQ++Cb/41gNNUwnW7uRM3ABMTCYlRHW456P71TAhIRfN+A7vzg0hZgGv7w== X-Received: by 10.194.246.129 with SMTP id xw1mr8900308wjc.142.1467211334841; Wed, 29 Jun 2016 07:42:14 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id t190sm5472766wmt.24.2016.06.29.07.42.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Jun 2016 07:42:14 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [RFC PATCH 07/11] lightnvm: remove unused lists from struct rrpc_block Date: Wed, 29 Jun 2016 16:41:52 +0200 Message-Id: <1467211316-22373-8-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467211316-22373-1-git-send-email-m@bjorling.me> References: <1467211316-22373-1-git-send-email-m@bjorling.me> 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 The ->list, ->open_list, and ->closed_list lists were previously used for statistics. However, their usage have been removed, and thus these can safely be removed. Signed-off-by: Matias Bjørling --- drivers/lightnvm/rrpc.c | 9 --------- drivers/lightnvm/rrpc.h | 8 -------- 2 files changed, 17 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index c3a6f34..10ed22b 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -205,7 +205,6 @@ static struct rrpc_block *rrpc_get_blk(struct rrpc *rrpc, struct rrpc_lun *rlun, } rblk = rrpc_get_rblk(rlun, blk->id); - list_add_tail(&rblk->list, &rlun->open_list); spin_unlock(&lun->lock); blk->priv = rblk; @@ -224,7 +223,6 @@ static void rrpc_put_blk(struct rrpc *rrpc, struct rrpc_block *rblk) spin_lock(&lun->lock); nvm_put_blk_unlocked(rrpc->dev, rblk->parent); - list_del(&rblk->list); spin_unlock(&lun->lock); } @@ -511,16 +509,11 @@ static void rrpc_gc_queue(struct work_struct *work) struct rrpc *rrpc = gcb->rrpc; struct rrpc_block *rblk = gcb->rblk; struct rrpc_lun *rlun = rblk->rlun; - struct nvm_lun *lun = rblk->parent->lun; spin_lock(&rlun->lock); list_add_tail(&rblk->prio, &rlun->prio_list); spin_unlock(&rlun->lock); - spin_lock(&lun->lock); - list_move_tail(&rblk->list, &rlun->closed_list); - spin_unlock(&lun->lock); - mempool_free(gcb, rrpc->gcb_pool); pr_debug("nvm: block '%lu' is full, allow GC (sched)\n", rblk->parent->id); @@ -1194,8 +1187,6 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end) rlun->rrpc = rrpc; INIT_LIST_HEAD(&rlun->prio_list); - INIT_LIST_HEAD(&rlun->open_list); - INIT_LIST_HEAD(&rlun->closed_list); INIT_WORK(&rlun->ws_gc, rrpc_lun_gc); spin_lock_init(&rlun->lock); diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index 5797343..448e39a 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -56,7 +56,6 @@ struct rrpc_block { struct nvm_block *parent; struct rrpc_lun *rlun; struct list_head prio; - struct list_head list; #define MAX_INVALID_PAGES_STORAGE 8 /* Bitmap for invalid page intries */ @@ -77,13 +76,6 @@ struct rrpc_lun { struct rrpc_block *blocks; /* Reference to block allocation */ struct list_head prio_list; /* Blocks that may be GC'ed */ - struct list_head open_list; /* In-use open blocks. These are blocks - * that can be both written to and read - * from - */ - struct list_head closed_list; /* In-use closed blocks. These are - * blocks that can _only_ be read from - */ struct work_struct ws_gc;