]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
lightnvm: remove debug lun statistics from gennvm
authorJavier González <jg@lightnvm.io>
Mon, 28 Nov 2016 21:39:08 +0000 (22:39 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 29 Nov 2016 19:12:51 +0000 (12:12 -0700)
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 <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/gennvm.c
include/linux/lightnvm.h

index 3cf5d5947070ac2fac31d4f72f7c79a9266e1942..dd9afd7ade1655bce4fbc07fa766d38d2d298aff 100644 (file)
@@ -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,
 
index e56c352272499f1321b3e1be7d01614dbab13ce4..ed04fa642371bc1f76717f8c2be6063d0342bad4 100644 (file)
@@ -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;