nvme: change num_children to be wider type
uint8_t is too small to handle huge payloads. 32M payload already overflow this. Change-Id: I083ba7d3ded25b99571d422b7a3a4e7653a8d231 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/408677 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
41d94136e6
commit
f9fae3f3a9
@ -169,7 +169,7 @@ struct nvme_request {
|
|||||||
* Number of children requests still outstanding for this
|
* Number of children requests still outstanding for this
|
||||||
* request which was split into multiple child requests.
|
* request which was split into multiple child requests.
|
||||||
*/
|
*/
|
||||||
uint8_t num_children;
|
uint16_t num_children;
|
||||||
uint32_t payload_size;
|
uint32_t payload_size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,6 +62,8 @@ nvme_cb_complete_child(void *child_arg, const struct spdk_nvme_cpl *cpl)
|
|||||||
static void
|
static void
|
||||||
nvme_request_add_child(struct nvme_request *parent, struct nvme_request *child)
|
nvme_request_add_child(struct nvme_request *parent, struct nvme_request *child)
|
||||||
{
|
{
|
||||||
|
assert(parent->num_children != UINT16_MAX);
|
||||||
|
|
||||||
if (parent->num_children == 0) {
|
if (parent->num_children == 0) {
|
||||||
/*
|
/*
|
||||||
* Defer initialization of the children TAILQ since it falls
|
* Defer initialization of the children TAILQ since it falls
|
||||||
|
Loading…
Reference in New Issue
Block a user