bdev/malloc: remove blocklen power of 2 restriction

This enables easier testing of variable sector size
block lengths (512 + 8, 4096 + 8, etc.) - otherwise
you need an NVMe namespace specially formatted for
VSS.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifafe57a2cf63edacb1e0f80a183841acf84fa1e4

Reviewed-on: https://review.gerrithub.io/422320
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2018-08-14 08:27:36 -07:00 committed by Ben Walker
parent c8fd001075
commit b8a05080e0

View File

@ -381,11 +381,6 @@ struct spdk_bdev *create_malloc_disk(const char *name, const struct spdk_uuid *u
struct malloc_disk *mdisk;
int rc;
if (block_size % 512 != 0) {
SPDK_ERRLOG("Block size %u is not a multiple of 512.\n", block_size);
return NULL;
}
if (num_blocks == 0) {
SPDK_ERRLOG("Disk must be more than 0 blocks\n");
return NULL;