[Libguestfs] [libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo

Eric Blake
Fri, 14 Aug 2020 22:00:19 -0000

Well, I'm not quite done (I still want to get nbdinfo to work on a
single nbd connection for all cases when reading the heads of the
file is not required), but I'm happy with patches 1-11, and 12-13
show where I'm headed for getting NBD_OPT_INFO to work.  Posting
now to see if some of the earlier patches are ready to commit while
I continue working on the latter half.

Eric Blake (13):
  api: Add nbd_set_full_info and friends
  info: Improve info without --list
  api: Add nbd_is_state_negotiating for new state
  api: Permit several existing API in Negotiating state
  api: Add nbd_set_opt_mode
  api: Add nbd_opt_abort and nbd_aio_opt_abort
  api: Add nbd_opt_go and nbd_aio_opt_go
  examples: Update list-exports to demonstrate nbd_opt_go
  info: Simplify by using nbd_opt_go
  api: Add nbd_opt_list
  api: Add nbd_aio_opt_list
  wip: api: Give aio_opt_go a completion callback
  wip: api: add nbd_opt_info, nbd_aio_opt_info

 docs/libnbd.pod                               |  42 +-
 lib/internal.h                                |  45 +-
 lib/nbd-protocol.h                            |  10 +-
 generator/API.ml                              | 478 +++++++++++++-----
 generator/API.mli                             |   1 +
 generator/C.ml                                |   4 +-
 generator/state_machine.ml                    |  37 +-
 generator/states-magic.c                      |   6 +-
 generator/states-newstyle-opt-go.c            |  88 +++-
 generator/states-newstyle-opt-list.c          |  83 ++-
 .../states-newstyle-opt-set-meta-context.c    |   4 +-
 generator/states-newstyle-opt-starttls.c      |  13 +-
 .../states-newstyle-opt-structured-reply.c    |   8 +-
 generator/states-newstyle.c                   |  80 ++-
 generator/states.c                            |  18 +-
 lib/connect.c                                 |   5 +-
 lib/flags.c                                   |  28 +-
 lib/handle.c                                  |  76 +--
 lib/is-state.c                                |  14 +-
 lib/opt.c                                     | 221 ++++++++
 lib/Makefile.am                               |   3 +-
 tests/Makefile.am                             |  14 +
 tests/errors.c                                |  11 +-
 tests/newstyle-limited.c                      |  58 ++-
 tests/oldstyle.c                              |  29 +-
 tests/opt-abort.c                             |  95 ++++
 tests/opt-info.c                              | 107 ++++
 examples/list-exports.c                       | 139 +++--
 examples/server-flags.c                       |  23 +
 interop/list-exports.c                        |  77 +--
 .gitignore                                    |   2 +
 info/Makefile.am                              |   7 +-
 info/info-description.sh                      |  56 ++
 info/nbdinfo.c                                | 167 +++---
 34 files changed, 1613 insertions(+), 436 deletions(-)
 create mode 100644 lib/opt.c
 create mode 100644 tests/opt-abort.c
 create mode 100644 tests/opt-info.c
 create mode 100755 info/info-description.sh

--
2.28.0