Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1218723

Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs

From Matias Bjørling <m@bjorling.me>
Newsgroups linux.kernel
Subject Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs
Date 2015-09-04 10:10 +0200
Message-ID <q4Uel-4EU-7@gated-at.bofh.it> (permalink)
References <pUQYp-2fN-3@gated-at.bofh.it> <pUQYq-2fN-37@gated-at.bofh.it> <q47nk-1S4-15@gated-at.bofh.it> <q4dM6-2DA-17@gated-at.bofh.it> <q4TrX-3vn-5@gated-at.bofh.it>
Organization Paletta

Show all headers | View raw


>
> So here is a suggestion, register_bm again
> if we found nvm_dev->bm == NULL in create_target(). And if it is still
> NULL after that. return an error "nvm: no compatible bm was found"
> and stop target creating. Otherwise, there would be a NULL Pointer
> reference problem.
>
> That's a real problem I met in my testing and I did this change
> in my local using. I hope that's useful to you.
>
Hi Yang,

Similar to this?

diff --git i/drivers/lightnvm/core.c w/drivers/lightnvm/core.c
index 5e4c2b8..0d2e5e3 100644
--- i/drivers/lightnvm/core.c
+++ w/drivers/lightnvm/core.c
@@ -262,8 +262,9 @@ int nvm_init(struct nvm_dev *dev)
         }

         if (!ret) {
-               pr_info("nvm: no compatible bm was found.\n");
-               return 0;
+               pr_info("nvm: %s was not initialized due to no 
compatible bm.\n",
+                                                               dev->name);
+               return -EINVAL;
         }

         pr_info("nvm: registered %s with luns: %u blocks: %lu sector 
size: %d\n",



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-02 06:00 +0200
  Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-02 12:50 +0200
    Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-04 09:20 +0200
      Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-04 10:10 +0200
        Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-09-04 10:40 +0200
          Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs Matias Bjørling <m@bjorling.me> - 2015-09-04 10:50 +0200

csiph-web