[Libguestfs] [libnbd PATCH v4 0/6] NBD 64-bit extensions (libnbd portions, prep work)

Eric Blake
Fri, 21 Jul 2023 16:08:38 -0000

This is preliminary work towards enabling 64-bit NBD extensions in
libnbd, based on review feedback given by Laszlo and others.  The v3
patch series is here:
https://listman.redhat.com/archives/libguestfs/2023-May/031617.html

This series focuses on patches 1 and 3-6 of v3 (patch 2 from that
series was already pushed earlier); there remains more work to do on
7-22 that will follow later.  For convenience, I've tagged this as
https://repo.or.cz/libnbd/ericb.git/shortlog/refs/tags/exthdr-v4a

Comparison to v3 (more notes in individual patches):

001/6:[down] 'internal: Track chunk payload length left'
002/6:[0106] [FC] 'block_status: Refactor array storage'
003/6:[0033] [FC] 'protocol: Add definitions for extended headers'
004/6:[0032] [FC] 'states: Prepare to send 64-bit requests'
005/6:[0137] [FC] 'states: Prepare to receive 64-bit replies'
006/6:[0017] [FC] 'states: Break deadlock if server goofs on extended
replies'

Eric Blake (6):
  internal: Track chunk payload length left
  block_status: Refactor array storage
  protocol: Add definitions for extended headers
  states: Prepare to send 64-bit requests
  states: Prepare to receive 64-bit replies
  states: Break deadlock if server goofs on extended replies

 lib/internal.h                   |  16 ++-
 lib/nbd-protocol.h               |  71 ++++++++---
 generator/API.ml                 |  20 ++--
 generator/state_machine.ml       |   9 +-
 generator/states-issue-command.c |  29 +++--
 generator/states-reply.c         | 109 +++++++++++++----
 generator/states-reply-chunk.c   | 197 ++++++++++++++++++++-----------
 lib/rw.c                         |  17 ++-
 tests/Makefile.am                |   4 +
 tests/pwrite-extended.c          | 108 +++++++++++++++++
 .gitignore                       |   1 +
 11 files changed, 448 insertions(+), 133 deletions(-)
 create mode 100644 tests/pwrite-extended.c


base-commit: 10b37a26360c19effec2733449ee5a37439181bf
--
2.41.0