diff options
author | Matias Bjørling <m@bjorling.me> | 2016-09-16 14:25:04 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-09-21 07:56:12 -0600 |
commit | ac81bfa9867103c9d50996ec21fa9179b81b727e (patch) | |
tree | f286f5ea3943c3532b852b44c460d6beb0c6d3c7 /drivers/nvme/host/lightnvm.c | |
parent | e105ddb4a2a13d779311349df2c32fa22a87c406 (diff) | |
download | op-kernel-dev-ac81bfa9867103c9d50996ec21fa9179b81b727e.zip op-kernel-dev-ac81bfa9867103c9d50996ec21fa9179b81b727e.tar.gz |
nvme: refactor namespaces to support non-gendisk devices
With LightNVM enabled namespaces, the gendisk structure is not exposed
to the user. This prevents LightNVM users from accessing the NVMe device
driver specific sysfs entries, and LightNVM namespace geometry.
Refactor the revalidation process, so that a namespace, instead of a
gendisk, is revalidated. This later allows patches to wire up the
sysfs entries up to a non-gendisk namespace.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/lightnvm.c')
-rw-r--r-- | drivers/nvme/host/lightnvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 63f483d..7268a7a 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -474,8 +474,9 @@ static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd, c->ph_rw.length = cpu_to_le16(rqd->nr_ppas - 1); if (rqd->opcode == NVM_OP_HBWRITE || rqd->opcode == NVM_OP_HBREAD) - c->hb_rw.slba = cpu_to_le64(nvme_block_nr(ns, - rqd->bio->bi_iter.bi_sector)); + /* momentarily hardcode the shift configuration. lba_shift from + * nvm_dev will be available in a follow-up patch */ + c->hb_rw.slba = cpu_to_le64(rqd->bio->bi_iter.bi_sector >> 3); } static void nvme_nvm_end_io(struct request *rq, int error) |