From patchwork Fri Nov 18 14:43:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= X-Patchwork-Id: 9436675 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 0578860237 for ; Fri, 18 Nov 2016 14:47:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00F2E29909 for ; Fri, 18 Nov 2016 14:47:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9EF029912; Fri, 18 Nov 2016 14:47:26 +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=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 9889929909 for ; Fri, 18 Nov 2016 14:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752496AbcKROqf (ORCPT ); Fri, 18 Nov 2016 09:46:35 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35617 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608AbcKROoK (ORCPT ); Fri, 18 Nov 2016 09:44:10 -0500 Received: by mail-wm0-f53.google.com with SMTP id a197so42654172wmd.0 for ; Fri, 18 Nov 2016 06:44:09 -0800 (PST) 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=MAG2Aq48FwH4SMcaMiwhmVX1Ul6QBe1oRgNRLSNlpn4=; b=IuU4rQlXCZ92cOj8G8kV/nivRIc/QarAH0620mk7ONZmiYiXFmGc68tiEJT6oRxS8z VT4Wvo9szBu1rUhQSfkU7E7q3dvnIbRGCRE5/bPMk5z3U83DfAVc2G8CsLKS36NdtfGb HHv7Cnt/i8uj8CppjRLlSEGzStwYRLzDug3E5J+OjSd9asAM82zhxCt+8qwUsUtXnJZK 2snokpD76UOPdcv6V7WUP06ngKv81KadWdcCQcnFMAjn3EAyRNOI4zJlFXVTYRKQZozw gipyTN06VjUW1yrzUpVFiW6T0SXzlbh/lhG2WTrsHROeUEscJ6KCfhYyTBD6C590ToWL dNfg== 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=MAG2Aq48FwH4SMcaMiwhmVX1Ul6QBe1oRgNRLSNlpn4=; b=U92tn9RtBJgXOyTlu6JbrPxQyrs0p36WzFKvPslYF2UksiYIWDwJcfO5AnVPkhbAlx apjDStBGvs/LieaFobvlP3aI/VrI5E8oXONSmyiO2JUke7QmuCpPlDz5p+sCQ/DxdQhV X+WK/rN5gkx4GfjgcY0m6hnOZ4Gm6domEbXGIHqSM5SAQg43BR1bxCV5YvSlDv1LVTvg z3VU3U25sTqoA2cI6891fErJ8yWqzM875zkRCFB3Z0te4v6hxjYKBl7YT7nZ6OIFNVV0 sFNnZmIGI/bdxklpYVogkBPSBBu4eUu962f2ZC1YeIUKUxndtPEXoRnIvOWarGtRqafb Wt6g== X-Gm-Message-State: AKaTC02L7HXSliO6d0e2Sfj/yrRoVbWQsjcUn6hFo+6JmwIsLqajXSleiVhoY9ZCcng8Cw== X-Received: by 10.28.62.141 with SMTP id l135mr599787wma.20.1479480248752; Fri, 18 Nov 2016 06:44:08 -0800 (PST) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id 138sm3703576wms.20.2016.11.18.06.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Nov 2016 06:44:08 -0800 (PST) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH 15/20] lightnvm: remove debug lun statistics from gennvm Date: Fri, 18 Nov 2016 15:43:37 +0100 Message-Id: <1479480222-18790-16-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479480222-18790-1-git-send-email-javier@cnexlabs.com> References: <1479480222-18790-1-git-send-email-javier@cnexlabs.com> 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 Since LUNs are managed internally on targets, the media manager has no access to the free LUN lists. Thus, debug functions that show LUN information on the device should not be implemented on the media manager, but rather on the target in itself. Signed-off-by: Javier González --- drivers/lightnvm/gennvm.c | 19 ------------------- include/linux/lightnvm.h | 5 ----- 2 files changed, 24 deletions(-) diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index 3cf5d59..dd9afd7 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c @@ -613,23 +613,6 @@ static int gen_erase_blk(struct nvm_dev *dev, struct nvm_block *blk, int flags) return nvm_erase_ppa(dev, &addr, 1, flags); } -static void gen_lun_info_print(struct nvm_dev *dev) -{ - struct gen_dev *gn = dev->mp; - struct nvm_lun *lun; - unsigned int i; - - - gen_for_each_lun(gn, lun, i) { - spin_lock(&lun->lock); - - pr_info("%s: lun%8u\t%u\n", dev->name, i, - lun->nr_free_blocks); - - spin_unlock(&lun->lock); - } -} - static struct nvmm_type gen = { .name = "gennvm", .version = {0, 1, 0}, @@ -645,8 +628,6 @@ static struct nvmm_type gen = { .mark_blk = gen_mark_blk, - .lun_info_print = gen_lun_info_print, - .get_area = gen_get_area, .put_area = gen_put_area, diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e56c352..ed04fa6 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -541,8 +541,6 @@ typedef int (nvmm_remove_tgt_fn)(struct nvm_dev *, struct nvm_ioctl_remove *); typedef int (nvmm_submit_io_fn)(struct nvm_dev *, struct nvm_rq *); typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *, int); typedef void (nvmm_mark_blk_fn)(struct nvm_dev *, struct ppa_addr, int); -typedef void (nvmm_lun_info_print_fn)(struct nvm_dev *); - typedef int (nvmm_get_area_fn)(struct nvm_dev *, sector_t *, sector_t); typedef void (nvmm_put_area_fn)(struct nvm_dev *, sector_t); @@ -562,9 +560,6 @@ struct nvmm_type { /* Bad block mgmt */ nvmm_mark_blk_fn *mark_blk; - /* Statistics */ - nvmm_lun_info_print_fn *lun_info_print; - nvmm_get_area_fn *get_area; nvmm_put_area_fn *put_area;