mirror of https://github.com/xemu-project/xemu.git
hw/block/nvme: fix pi constraint check
Protection Information can only be enabled if there is at least 8 bytes of metadata. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
d0d3dd401b
commit
5ad7d0174e
|
@ -394,7 +394,7 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns, Error **errp)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (ns->params.pi && !ns->params.ms) {
|
||||
if (ns->params.pi && ns->params.ms < 8) {
|
||||
error_setg(errp, "at least 8 bytes of metadata required to enable "
|
||||
"protection information");
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue