Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281709 > unrolled thread
| Started by | Matias Bjørling <m@bjorling.me> |
|---|---|
| First post | 2015-12-02 13:20 +0100 |
| Last post | 2015-12-04 11:00 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH RFC 1/3] lightnvm: check mm before use Matias Bjørling <m@bjorling.me> - 2015-12-02 13:20 +0100
[PATCH RFC 2/3] lightnvm: comments on constants Matias Bjørling <m@bjorling.me> - 2015-12-02 13:20 +0100
Re: [PATCH RFC 1/3] lightnvm: check mm before use Wenwei Tao <ww.tao0320@gmail.com> - 2015-12-04 09:10 +0100
Re: [PATCH RFC 1/3] lightnvm: check mm before use Matias Bjørling <m@bjorling.me> - 2015-12-04 11:00 +0100
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2015-12-02 13:20 +0100 |
| Subject | [PATCH RFC 1/3] lightnvm: check mm before use |
| Message-ID | <qBey6-72N-25@gated-at.bofh.it> |
The core can initialize I/Os before a media manager is registered with
the lightnvm subsystem. Make sure that we don't call the media manager
prematurely.
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/nvme/host/lightnvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 06c3364..762c9a7 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -455,7 +455,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
struct nvm_rq *rqd = rq->end_io_data;
struct nvm_dev *dev = rqd->dev;
- if (dev->mt->end_io(rqd, error))
+ if (dev->mt && dev->mt->end_io(rqd, error))
pr_err("nvme: err status: %x result: %lx\n",
rq->errors, (unsigned long)rq->special);
--
2.1.4
--
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/
[toc] | [next] | [standalone]
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2015-12-02 13:20 +0100 |
| Subject | [PATCH RFC 2/3] lightnvm: comments on constants |
| Message-ID | <qBey7-72N-51@gated-at.bofh.it> |
| In reply to | #1281709 |
It is not obvious what NVM_IO_* and NVM_BLK_T_* is used for. Make sure
to comment them appropriately as the other constants.
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
include/linux/lightnvm.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index c6916ae..935ef38 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -50,9 +50,16 @@ enum {
NVM_IO_DUAL_ACCESS = 0x1,
NVM_IO_QUAD_ACCESS = 0x2,
+ /* NAND Access Modes */
NVM_IO_SUSPEND = 0x80,
NVM_IO_SLC_MODE = 0x100,
NVM_IO_SCRAMBLE_DISABLE = 0x200,
+
+ /* Block Types */
+ NVM_BLK_T_FREE = 0x0,
+ NVM_BLK_T_BAD = 0x1,
+ NVM_BLK_T_DEV = 0x2,
+ NVM_BLK_T_HOST = 0x4,
};
struct nvm_id_group {
--
2.1.4
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Wenwei Tao <ww.tao0320@gmail.com> |
|---|---|
| Date | 2015-12-04 09:10 +0100 |
| Message-ID | <qBTBf-7g-3@gated-at.bofh.it> |
| In reply to | #1281709 |
2015-12-02 20:16 GMT+08:00 Matias Bjørling <m@bjorling.me>: > The core can initialize I/Os before a media manager is registered with > the lightnvm subsystem. Make sure that we don't call the media manager > prematurely. > > Signed-off-by: Matias Bjørling <m@bjorling.me> > --- > drivers/nvme/host/lightnvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c > index 06c3364..762c9a7 100644 > --- a/drivers/nvme/host/lightnvm.c > +++ b/drivers/nvme/host/lightnvm.c > @@ -455,7 +455,7 @@ static void nvme_nvm_end_io(struct request *rq, int error) > struct nvm_rq *rqd = rq->end_io_data; > struct nvm_dev *dev = rqd->dev; > > - if (dev->mt->end_io(rqd, error)) > + if (dev->mt && dev->mt->end_io(rqd, error)) Is there any chance core can initialize IOs on device without register with a media manger ? In my understanding core cannot create target on device without a media manger, if core doesn't have a target how can core initialize IOs on these devices? If I'm wrong about this, please correct me. -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2015-12-04 11:00 +0100 |
| Message-ID | <qBVjH-ZM-5@gated-at.bofh.it> |
| In reply to | #1283617 |
> Is there any chance core can initialize IOs on device without register > with a media manger ? > In my understanding core cannot create target on device without a > media manger, if core doesn't have a target how can core initialize > IOs on these devices? If I'm wrong about this, please correct me. > You're right. This is preparation patches for system blocks. The core gets features added to work with the device, before gennvm is initialized. For that case, no media manager will have been initialized, and we therefore can't call it. -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web