tools/xenstored: Extend restore code to handle multiple input buffer
authorJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 10:41:00 +0000 (11:41 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 10:41:00 +0000 (11:41 +0100)
commitc0fe360f42245da6869362584b1f115a71d36ad6
treed99474730773ef734c3807a5b7216e4ea79fb0af
parent361f1deb42ec32ea97df7e79f8df12bfc2d0e049
tools/xenstored: Extend restore code to handle multiple input buffer

Currently, the restore code is considering the stream will contain at
most one in-flight request per connection. In a follow-up changes, we
will want to transfer multiple in-flight requests.

The function read_state_buffered() is now extended to restore multiple
in-flight request. Complete requests will be queued as delayed
requests, if there a partial request (only the last one can) then it
will used as the current in-flight request.

Note that we want to bypass the quota check for delayed requests as
the new Xenstore may have a lower limit.

Lastly, there is no need to change the specification as there was
no restriction on the number of in-flight requests preserved.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/xenstore/xenstored_core.c