config_converter.py: fix malloc num_blocks arithmetics
Use floor division so that operation results in "int" returned. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I17126e81102b9f4612efc954213bab9ad55a9395 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10824 Reviewed-by: Michal Berger <michalx.berger@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
7f10a88c11
commit
9d1b1fb332
@ -186,7 +186,7 @@ def get_malloc_bdev_json(config, section):
|
||||
malloc_json.append({
|
||||
"params": {
|
||||
"block_size": params[2][3],
|
||||
"num_blocks": params[1][3] * 1024 * 1024 / params[2][3],
|
||||
"num_blocks": params[1][3] * 1024 * 1024 // params[2][3],
|
||||
"name": "Malloc%s" % lun
|
||||
},
|
||||
"method": "bdev_malloc_create"
|
||||
|
Loading…
Reference in New Issue
Block a user