search for: nbd_internal_is_state_negotiating

Displaying 6 results from an estimated 6 matches for "nbd_internal_is_state_negotiating".

2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...bool list_exports; size_t nr_exports; @@ -398,6 +401,7 @@ extern int nbd_internal_set_block_size (struct nbd_handle *h, uint32_t min, /* is-state.c */ extern bool nbd_internal_is_state_created (enum state state); extern bool nbd_internal_is_state_connecting (enum state state); +extern bool nbd_internal_is_state_negotiating (enum state state); extern bool nbd_internal_is_state_ready (enum state state); extern bool nbd_internal_is_state_processing (enum state state); extern bool nbd_internal_is_state_dead (enum state state); diff --git a/generator/API.ml b/generator/API.ml index 82fdf75..ff7f4c1 100644 --- a/generat...
2020 Aug 11
0
Re: [libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...> * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Lesser General Public > @@ -58,6 +58,12 @@ nbd_internal_is_state_connecting (enum state state) > return is_connecting_group (group); > } > > +bool > +nbd_internal_is_state_negotiating (enum state state) > +{ > + return state == STATE_NEGOTIATING; > +} > + > bool > nbd_internal_is_state_ready (enum state state) > { When I was reading the rest of the patch I thought it would have been easier to review if the addition of the new state was in a separate com...
2020 Aug 14
0
[libnbd PATCH v2 12/13] wip: api: Give aio_opt_go a completion callback
...*h) { - int r = nbd_unlocked_aio_opt_go (h); + int err; + nbd_completion_callback c = { .callback = go_complete, .user_data = &err }; + int r = nbd_unlocked_aio_opt_go (h, c); if (r == -1) return r; r = wait_for_option (h); + if (r == 0) + r = err; if (r == 0 && nbd_internal_is_state_negotiating (get_next_state (h))) return -1; /* NBD_OPT_GO failed, but can be attempted again */ return r; @@ -132,9 +144,11 @@ nbd_unlocked_opt_list (struct nbd_handle *h, nbd_list_callback list) /* Issue NBD_OPT_GO (or NBD_OPT_EXPORT_NAME) without waiting. */ int -nbd_unlocked_aio_opt_go (struct n...
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
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):
2020 Aug 11
3
Re: [libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...gt;> h->wbuf = &h->sbuf; > > This makes me think maybe we should just derive this string from the > gflags when the caller calls get_protocol. Doable. Probably even something we could separate out, to keep the meat of this patch more focused. >> +bool >> +nbd_internal_is_state_negotiating (enum state state) >> +{ >> + return state == STATE_NEGOTIATING; >> +} >> + >> bool >> nbd_internal_is_state_ready (enum state state) >> { > > When I was reading the rest of the patch I thought it would have been > easier to review if the a...
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good testsuite coverage and demonstrable performance improvement to nbdinfo, I'm going ahead and pushing this now. We may still want to add further nbd_opt_* commands for other fine-grained tuning of negotiation, but for now, I think things have stabilized on this end, and I can return to polishing .list_exports on the nbdkit