diff options
author | 2018-12-11 20:16:25 +0100 | |
---|---|---|
committer | 2018-12-11 12:22:35 -0700 | |
commit | a16816b9e462e8ee86a908606bde54b53cfeca80 (patch) | |
tree | 3708bab87ed721388fec3e349f8e33b8fb26eb5b /drivers/lightnvm/pblk-init.c | |
parent | lightnvm: dynamic DMA pool entry size (diff) | |
download | wireguard-linux-a16816b9e462e8ee86a908606bde54b53cfeca80.tar.xz wireguard-linux-a16816b9e462e8ee86a908606bde54b53cfeca80.zip |
lightnvm: disable interleaved metadata
Currently pblk only check the size of I/O metadata and does not take
into account if this metadata is in a separate buffer or interleaved
in a single metadata buffer.
In reality only the first scenario is supported, where second mode will
break pblk functionality during any IO operation.
This patch prevents pblk to be instantiated in case device only
supports interleaved metadata.
Reviewed-by: Javier González <[email protected]>
Signed-off-by: Igor Konopko <[email protected]>
Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index ff6a6df369c3..e8055b796381 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -1175,6 +1175,12 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk, return ERR_PTR(-EINVAL); } + if (geo->ext) { + pblk_err(pblk, "extended metadata not supported\n"); + kfree(pblk); + return ERR_PTR(-EINVAL); + } + spin_lock_init(&pblk->resubmit_lock); spin_lock_init(&pblk->trans_lock); spin_lock_init(&pblk->lock); |