[roll] Roll fuchsia [block_server][c] Track request state

The server keeps track of active request state so the C++ side doesn't
need to be trusted to do so.  The C++ side now use request IDs which
are indices into the internal request state map, and respond to requests
by ID.

This was necessary because C clients which asynchronously respond to
messages don't work with the current API, where BlockServer::OnRequests
passes in a const Session& (expecting a synchronous call to
Session::SendReply before OnRequests returns).  The client can't just
store the Session as a pointer because this is a temporary wrapper
object.  One option was to create a ref type (e.g. SessionRef) and pass
that in, but there is a greater change of use-after-free type issues
with that, versus the approach taken here.

This has several other advantages:
- Internally we don't need to use high-bits in request IDs to decide
  whether to discard the VMO on request completion; the internal request
  state keeps a strong reference to the VMO if needed.
- We were able to get rid of the hack to create a Session that didn't
  run its destructor in block_server.cc.
- The C API becomes a bit simpler.

Original-Bug: 410926221
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1255385
Original-Revision: b1916a0641b39a5597d957c178a79bbc266b562a
GitOrigin-RevId: 39b111e851c204b48ce28883763255d394191466
Change-Id: Ic7d0c50a24a99594f5369a441f47a27b1ebb8876
1 file changed
tree: f17353fbd3579f6f3960afceb26a49aeb5e18e0c
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.