Commit 003fad37 authored by Javier González's avatar Javier González Committed by Jens Axboe

lightnvm: enable metadata to be sent to device

Enable metadata buffer to be sent to the device through the metadata
field on the physical rw nvme command. The size of the metadata buffer
must follow dev->oob_size * # of PPAs.
Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
Updated description.
Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 57682b49
...@@ -467,6 +467,7 @@ static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd, ...@@ -467,6 +467,7 @@ static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd,
c->ph_rw.opcode = rqd->opcode; c->ph_rw.opcode = rqd->opcode;
c->ph_rw.nsid = cpu_to_le32(ns->ns_id); c->ph_rw.nsid = cpu_to_le32(ns->ns_id);
c->ph_rw.spba = cpu_to_le64(rqd->ppa_addr.ppa); c->ph_rw.spba = cpu_to_le64(rqd->ppa_addr.ppa);
c->ph_rw.metadata = cpu_to_le64(rqd->meta_list);
c->ph_rw.control = cpu_to_le16(rqd->flags); c->ph_rw.control = cpu_to_le16(rqd->flags);
c->ph_rw.length = cpu_to_le16(rqd->nr_pages - 1); c->ph_rw.length = cpu_to_le16(rqd->nr_pages - 1);
......
...@@ -230,8 +230,8 @@ struct nvm_rq { ...@@ -230,8 +230,8 @@ struct nvm_rq {
struct ppa_addr *ppa_list; struct ppa_addr *ppa_list;
void *metadata; void *meta_list;
dma_addr_t dma_metadata; dma_addr_t dma_meta_list;
struct completion *wait; struct completion *wait;
nvm_end_io_fn *end_io; nvm_end_io_fn *end_io;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment