search for: is_connecting_group

Displaying 9 results from an estimated 9 matches for "is_connecting_group".

2019 Jun 05
0
[PATCH libnbd 1/4] lib: Move nbd_aio_is_* function impls to separate source file.
...b/aio.c @@ -48,84 +48,6 @@ nbd_unlocked_aio_notify_write (struct nbd_handle *h) return nbd_internal_run (h, notify_write); } -/* NB: is_locked = false, may_set_error = false. */ -int -nbd_unlocked_aio_is_created (struct nbd_handle *h) -{ - return h->state == STATE_START; -} - -static int -is_connecting_group (enum state_group group) -{ - switch (group) { - case GROUP_TOP: - return 0; - case GROUP_CONNECT: - case GROUP_CONNECT_TCP: - case GROUP_CONNECT_COMMAND: - case GROUP_MAGIC: - case GROUP_OLDSTYLE: - case GROUP_NEWSTYLE: - return 1; - default: - return is_connecting_group (nbd_int...
2019 May 30
3
[PATCH libnbd 0/2] Avoid lock and error overhead on some calls.
This works. I'm in the middle of testing whether there is any noticable benefit. Rich.
2019 Jun 05
9
[PATCH libnbd 0/4] lib: Atomically update h->state.
I need to think about this patch series a bit more, but it does at least pass the tests. Rich.
2019 Jun 05
0
[PATCH libnbd 2/4] lib: Split nbd_aio_is_* functions into internal.
...r = false. */ -int -nbd_unlocked_aio_is_created (struct nbd_handle *h) +/* Internal functions to test state or groups of states. */ + +bool +nbd_internal_is_state_created (enum state state) { - return h->state == STATE_START; + return state == STATE_START; } static int @@ -51,20 +52,18 @@ is_connecting_group (enum state_group group) } } -/* NB: is_locked = false, may_set_error = false. */ -int -nbd_unlocked_aio_is_connecting (struct nbd_handle *h) +bool +nbd_internal_is_state_connecting (enum state state) { - enum state_group group = nbd_internal_state_group (h->state); + enum state_group g...
2019 May 22
8
[PATCH libnbd v2 0/6] Test connection states.
Patch 1/6 was posted before and I didn't change it: https://www.redhat.com/archives/libguestfs/2019-May/thread.html#00134 That doesn't necessarily mean I shouldn't change it, I'm posting it again because the other patches depend on it. The main change in this series is we add three new API functions: nbd_aio_is_created - connection has just been created
2020 Aug 11
0
Re: [libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...9 Red Hat Inc. > + * Copyright (C) 2013-2020 Red Hat Inc. > * > * 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 be...
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...ace - * Copyright (C) 2013-2019 Red Hat Inc. + * Copyright (C) 2013-2020 Red Hat Inc. * * 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) { @@ -120,6 +126,12 @@ nbd_unlocked_aio_is_connecting (struct nbd_handle *h) return nbd_internal_is_state_connecting (get_...
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must
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):