Displaying 11 results from an estimated 11 matches for "nbd_get_debug".
2019 Aug 14
3
[libnbd PATCH 0/2] Drop generated file from git
Rich recently patched things to generate one man page per function
rather than libnbd-api.3 (nice), but in doing so got stumped by a
problem with a fresh git clone (automake fails for any 'include'
directive that does not already exist). I've figured out how to hack
around it, but the hack requires GNU make. We already use GNU make
constructs elsewhere (such as $(wildcard)), but
2019 Aug 14
0
[libnbd PATCH 2/2] docs: Drop docs/Makefile.inc from git
...eneral Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-api_built += \
- nbd_set_debug \
- nbd_get_debug \
- nbd_set_debug_callback \
- nbd_clear_debug_callback \
- nbd_set_handle_name \
- nbd_get_handle_name \
- nbd_set_export_name \
- nbd_get_export_name \
- nbd_set_tls \
- nbd_get_tls \
- nbd_set_tls_certificates \
- nbd_set_tls_verify_peer \
- nbd_get_tls_verify_peer \
- nbd_set_tls_username \
- n...
2019 Aug 15
1
[PATCH libnbd] docs: Change docs/Makefile.inc back to a regular include, readd to git.
...General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+api_built = \
+ nbd_set_debug \
+ nbd_get_debug \
+ nbd_set_debug_callback \
+ nbd_clear_debug_callback \
+ nbd_set_handle_name \
+ nbd_get_handle_name \
+ nbd_set_export_name \
+ nbd_get_export_name \
+ nbd_set_tls \
+ nbd_get_tls \
+ nbd_set_tls_certificates \
+ nbd_set_tls_verify_peer \
+ nbd_get_tls_verify_peer \
+ nbd_set_tls_username \
+ n...
2019 May 22
0
[libnbd PATCH v3 7/7] examples: Add example to demonstrate just-fixed deadlock scenario
...lready contains */
+ if (nbd_pread (nbd, out, packetsize, packetsize) == -1) {
+ fprintf (stderr, "sync read failed: %s\n", nbd_get_error ());
+ exit (EXIT_FAILURE);
+ }
+
+ /* When not debugging, set an alarm, in case this test deadlocks
+ * instead of succeeding
+ */
+ if (nbd_get_debug (nbd) < 1) {
+ signal (SIGALRM, alarm_handler);
+ alarm (10);
+ }
+
+ if (try_deadlock (NULL) == -1)
+ exit (EXIT_FAILURE);
+
+ if (nbd_shutdown (nbd) == -1) {
+ fprintf (stderr, "%s\n", nbd_get_error ());
+ exit (EXIT_FAILURE);
+ }
+
+ nbd_close (nbd);
+
+ return...
2019 Jul 27
3
[PATCH libnbd] lib: Use symbol versions.
...nbd_aio_notify_write@LIBNBD_1.0
U nbd_aio_peek_command_completed@LIBNBD_1.0
U nbd_aio_pread_callback@LIBNBD_1.0
U nbd_aio_pwrite_callback@LIBNBD_1.0
U nbd_close@LIBNBD_1.0
U nbd_create@LIBNBD_1.0
U nbd_get_debug@LIBNBD_1.0
U nbd_get_error@LIBNBD_1.0
Rich.
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING **
This patch shows how to integrate libnbd and the glib main loop.
Posted mainly as a point of discussion as it doesn't quite work yet.
Rich.
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...; + */
> +static struct NBDSource *
> +create_libnbd_gsource (struct nbd_handle *nbd)
> +{
> + struct NBDSource *source;
> +
> + source =
> + (struct NBDSource *) g_source_new (&nbd_source_funcs, sizeof *source);
> + source->nbd = nbd;
> + source->debug = nbd_get_debug (nbd);
> + source->poll_registered = false;
> +
> + return source;
> +}
> +
> +/*----------------------------------------------------------------------*/
> +
> +/* The rest of this file is an example showing how to use the GSource
> + * defined above to control two n...
2019 Jul 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...he return value if you need a GSource pointer.
+ */
+static struct NBDSource *
+create_libnbd_gsource (struct nbd_handle *nbd)
+{
+ struct NBDSource *source;
+
+ source =
+ (struct NBDSource *) g_source_new (&nbd_source_funcs, sizeof *source);
+ source->nbd = nbd;
+ source->debug = nbd_get_debug (nbd);
+ source->poll_registered = false;
+
+ return source;
+}
+
+/*----------------------------------------------------------------------*/
+
+/* The rest of this file is an example showing how to use the GSource
+ * defined above to control two nbdkit subprocesses, copying from one
+ * to t...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...he return value if you need a GSource pointer.
+ */
+static struct NBDSource *
+create_libnbd_gsource (struct nbd_handle *nbd)
+{
+ struct NBDSource *source;
+
+ source =
+ (struct NBDSource *) g_source_new (&nbd_source_funcs, sizeof *source);
+ source->nbd = nbd;
+ source->debug = nbd_get_debug (nbd);
+ source->fd = -1;
+
+ return source;
+}
+
+/*----------------------------------------------------------------------*/
+
+/* The rest of this file is an example showing how to use the GSource
+ * defined above to control two nbdkit subprocesses, copying from one
+ * to the other in para...
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's
review, *except* that it still doesn't retire commands (although this
seems to make no obvious difference, except possibly a performance and
memory impact).
Rich.
2019 May 22
12
[libnbd PATCH v3 0/7] Avoid deadlock with in-flight commands
Since v2:
- rebase to Rich's new API calls
- more refactoring in patch 1 (retitled)
- new patches 3 and 4
- fix data corruption in patch 6 (was 4)
- more tweaks to the reproducer example (including using new API from 3)
Eric Blake (7):
lib: Refactor command_common() to do more common work
commands: Allow for a command queue
commands: Expose FIFO ordering of server completions