summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/rrpc.c
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2016-11-29 00:39:05 +0300
committerJens Axboe <axboe@fb.com>2016-11-29 22:12:51 +0300
commit8176117b82e49e043d045f214ba7a892fba6b827 (patch)
tree313d9fbd1d0df7ae9aac03b6f84d01159d3025bf /drivers/lightnvm/rrpc.c
parentde93434fcf74d41754a48e45365a5914e00bc0be (diff)
downloadlinux-8176117b82e49e043d045f214ba7a892fba6b827.tar.xz
lightnvm: manage lun partitions internally in mm
LUNs are exclusively owned by targets implementing a block device FTL. Doing this reservation requires at the moment a 2-way callback gennvm <-> target. The reason behind this is that LUNs were not assumed to always be exclusively owned by targets. However, this design decision goes against I/O determinism QoS (two targets would mix I/O on the same parallel unit in the device). This patch makes LUN reservation as part of the target creation on the media manager. This makes that LUNs are always exclusively owned by the target instantiated on top of them. LUN stripping and/or sharing should be implemented on the target itself or the layers on top. 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>
Diffstat (limited to 'drivers/lightnvm/rrpc.c')
-rw-r--r--drivers/lightnvm/rrpc.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 34d2ebf90ed6..88e0d0677b09 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -1126,7 +1126,6 @@ static void rrpc_core_free(struct rrpc *rrpc)
static void rrpc_luns_free(struct rrpc *rrpc)
{
- struct nvm_dev *dev = rrpc->dev;
struct nvm_lun *lun;
struct rrpc_lun *rlun;
int i;
@@ -1139,7 +1138,6 @@ static void rrpc_luns_free(struct rrpc *rrpc)
lun = rlun->parent;
if (!lun)
break;
- dev->mt->release_lun(dev, lun->id);
vfree(rlun->blocks);
}
@@ -1169,11 +1167,6 @@ static int rrpc_luns_init(struct rrpc *rrpc, int lun_begin, int lun_end)
int lunid = lun_begin + i;
struct nvm_lun *lun;
- if (dev->mt->reserve_lun(dev, lunid)) {
- pr_err("rrpc: lun %u is already allocated\n", lunid);
- goto err;
- }
-
lun = dev->mt->get_lun(dev, lunid);
if (!lun)
goto err;