@@ -1179,6 +1179,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);
@@ -982,6 +982,7 @@ void nvme_nvm_update_nvm_info(struct nvme_ns *ns)
if (geo->version != NVM_OCSSD_SPEC_12) {
geo->csecs = 1 << ns->lba_shift;
geo->sos = ns->ms;
+ geo->ext = ns->ext;
}
if (nvm_create_dma_pool(ndev))
@@ -357,6 +357,7 @@ struct nvm_geo {
u32 clba; /* sectors per chunk */
u16 csecs; /* sector size */
u16 sos; /* out-of-band area size */
+ bool ext; /* metadata in extended data buffer */
/* device write constrains */
u32 ws_min; /* minimum write size */