search for: eproto

Displaying 20 results from an estimated 132 matches for "eproto".

Did you mean: proto
2019 Jun 25
1
[libnbd PATCH] pread_structured: Change callback type to use Mutable error
...r has been detected, then the overall read command will -fail with the same value of C<errno> left after the failing callback; -but any further chunks will still invoke the callback. +fail with any non-zero value stored into the callback's C<error> +parameter (with a default of C<EPROTO>); but any further chunks will +still invoke the callback. The C<chunk> function is called once per chunk of data received. The C<subbuf> and C<count> parameters represent the subset of the original @@ -1356,25 +1357,27 @@ C<subbuf> always points within the original C...
2019 Jun 25
4
Re: Few libnbd questions/concerns
...ch is a bit confusing to me. I could be nicer to have that report that it >> really was the callback that caused this. > > Not sure about this one - Eric? Right now, a failed callback will cause the overall nbd_block_status() to fail with whatever errno the callback left behind, with EPROTO as the default. I'm guessing you didn't set an errno when you returned -1? Is there a better default we should use than EPROTO? Is there really a way to diagnose without an errno value that the callback failed but didn't set errno? There's also the related question - my patches t...
2019 Jun 27
1
[libnbd PATCH] block-status: Make callback usage consistent with pread_structured
...<errno> left after the -failing callback. +cause a deadlock. If the callback returns C<-1>, and no earlier +error has been detected, then the overall block status command +will fail with any non-zero value stored into the callback's +C<error> parameter (with a default of C<EPROTO>); but any further +contexts will still invoke the callback. The C<extent> function is called once per type of metadata available, with the C<data> passed to this function. The C<metacontext> @@ -1564,6 +1566,8 @@ NBD protocol document in the section about C<NBD_REPLY_T...
2019 Aug 14
2
[libnbd PATCH] lib: Consolidate free callbacks to just happen at retire time
...nerator/states-reply-simple.c index 8e3d7f1..2f83e6f 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -69,7 +69,6 @@ cmd->offset, LIBNBD_READ_DATA, &error) == -1) cmd->error = error ? error : EPROTO; - FREE_CALLBACK (cmd->cb.fn.chunk); } SET_NEXT_STATE (%^FINISH_COMMAND); diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 2e327ce..58e83d4 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -2...
2019 Jun 04
0
[libnbd PATCH 2/2] api: Recover from block status callback failure
...ontext chunks from the server, and relying on the previous patch's ability to preserve the first error encountered. Update the interop test with qemu's dirty bitmap context to provoke callback failure, as well as prove that the connection is still valid. I did not go as far as documenting EPROTO as our default errno if the callback returns -1 with errno unchanged. --- generator/generator | 5 ++- generator/states-reply-structured.c | 57 +++++++++++++------------ interop/dirty-bitmap.c | 65 +++++++++++++++++++++++------ 3 files changed, 86 insertions(+), 41...
2023 Aug 04
2
[libnbd PATCH v4 01/25] block_status: Add some sanity checking of server lengths
.../* Call the caller's extent function. */ > - if (CALL_CALLBACK (cmd->cb.fn.extent, name, cmd->offset, > - h->bs_entries, h->bs_count * 2, &error) == -1) > - if (cmd->error == 0) > - cmd->error = error ? error : EPROTO; > - } > - else > + SET_NEXT_STATE (%FINISH); > + if (i == h->meta_contexts.len) { > /* Emit a debug message, but ignore it. */ > debug (h, "server sent unexpected meta context ID %" PRIu32, > context_id); > + break;...
2019 Aug 13
0
[PATCH libnbd 4/4] lib: Add CALL_CALLBACK macro.
...&error) == -1) + if (CALL_CALLBACK (cmd->cb.fn.chunk, + cmd->data, cmd->count, + cmd->offset, LIBNBD_READ_DATA, + &error) == -1) cmd->error = error ? error : EPROTO; FREE_CALLBACK (cmd->cb.fn.chunk); } diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 62ae3ad..2e327ce 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -301,10 +301,10 @@ * current erro...
2019 Aug 12
0
[PATCH libnbd 4/7] lib: Allow closure user_data to be associated with a free callback.
...9b249ab..9684bc4 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -69,6 +69,7 @@ cmd->data, cmd->count, cmd->offset, LIBNBD_READ_DATA, &error) == -1) cmd->error = error ? error : EPROTO; + nbd_internal_free_callback (h, cmd->cb.fn_user_data); cmd->cb.fn.chunk = NULL; /* because we've freed it */ } diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index cdd9f10..b016cd7 100644 --- a/generator/states-reply-structured....
2011 Jan 21
1
Building nut 2.6.0 on OpenBSD 4.8 - compile issue
...de -DSHUT_MODE -g -O2 -Wall -Wsign-compare -MT newmge_shut-usbhid-ups.o -MD -MP -MF .deps/newmge_shut-usbhid-ups.Tpo -c -o newmge_shut-usbhid-ups.o `test -f 'usbhid-ups.c' || echo './'`usbhid-ups.c usbhid-ups.c: In function 'hid_ups_walk': usbhid-ups.c:1231: error: 'EPROTO' undeclared (first use in this function) usbhid-ups.c:1231: error: (Each undeclared identifier is reported only once usbhid-ups.c:1231: error: for each function it appears in.) gmake[1]: *** [newmge_shut-usbhid-ups.o] Error 1 gmake[1]: Leaving directory `/home/downloads/nut/nut-2.6.0/drivers...
2019 Jul 25
0
[libnbd PATCH] lib: Reduce number of read/block_status callbacks
...id, cmd->cb.fn_user_data, cmd->data + (offset - cmd->offset), length - sizeof offset, offset, LIBNBD_READ_DATA, &error) == -1) if (cmd->error == 0) cmd->error = error ? error : EPROTO; + if (valid & LIBNBD_CALLBACK_FREE) + cmd->cb.fn.read = NULL; /* because we've freed it */ } SET_NEXT_STATE (%FINISH); @@ -446,13 +465,16 @@ memset (cmd->data + offset, 0, length); if (cmd->cb.fn.read) { int error = cmd->error; + uns...
2019 Aug 13
0
[PATCH libnbd 3/4] lib: Add FREE_CALLBACK macro.
...ple.c index 7f2775d..8905367 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -69,9 +69,7 @@ cmd->offset, LIBNBD_READ_DATA, &error) == -1) cmd->error = error ? error : EPROTO; - if (cmd->cb.fn.chunk.free) - cmd->cb.fn.chunk.free (cmd->cb.fn.chunk.user_data); - cmd->cb.fn.chunk.callback = NULL; /* because we've freed it */ + FREE_CALLBACK (cmd->cb.fn.chunk); } SET_NEXT_STATE (%^FINISH_COMMAND); diff --git a/generator/s...
2019 Jun 04
3
[libnbd PATCH 0/2] Better handling of failed block_status callback
Rather than moving the connection to DEAD, we can just ignore further contexts to the existing command handle, and fail the overall command with the same errno as the failed callback. Eric Blake (2): states: Track cmd->error as errno, not wire value api: Recover from block status callback failure generator/generator | 5 ++- generator/states-reply-simple.c | 2 +-
2019 Jun 27
0
Re: Few libnbd questions/concerns
...e. I could be nicer to have that report that it >>> really was the callback that caused this. >> >> Not sure about this one - Eric? > > Right now, a failed callback will cause the overall nbd_block_status() > to fail with whatever errno the callback left behind, with EPROTO as the > default. I'm guessing you didn't set an errno when you returned -1? Is > there a better default we should use than EPROTO? Is there really a way > to diagnose without an errno value that the callback failed but didn't > set errno? > My pending patch to take a...
2019 Aug 15
0
Re: [libnbd PATCH] lib: Consolidate free callbacks to just happen at retire time
...index 8e3d7f1..2f83e6f 100644 > --- a/generator/states-reply-simple.c > +++ b/generator/states-reply-simple.c > @@ -69,7 +69,6 @@ > cmd->offset, LIBNBD_READ_DATA, > &error) == -1) > cmd->error = error ? error : EPROTO; > - FREE_CALLBACK (cmd->cb.fn.chunk); > } > > SET_NEXT_STATE (%^FINISH_COMMAND); > diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c > index 2e327ce..58e83d4 100644 > --- a/generator/states-reply-structured.c > +++ b/g...
2019 Jun 18
0
[libnbd PATCH 5/8] states: Wire in a read callback
...ART */ + assert (cmd); + if (cmd->cb.fn.read) { + assert (cmd->error == 0); + errno = 0; + if (cmd->cb.fn.read (cmd->cb.opaque, cmd->data, cmd->count, + cmd->offset, LIBNBD_READ_DATA) == -1) + cmd->error = errno ? errno : EPROTO; + } + + SET_NEXT_STATE (%^FINISH_COMMAND); } return 0; diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 657106e..00659de 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -225,7 +225,9 @@ ass...
2019 Jun 21
0
[libnbd PATCH v2 2/5] states: Wire in a read callback
...*/ + assert (cmd); + if (cmd->cb.fn.read) { + assert (cmd->error == 0); + errno = 0; + if (cmd->cb.fn.read (cmd->cb.opaque, cmd->data, cmd->count, + cmd->offset, 0, LIBNBD_READ_DATA) == -1) + cmd->error = errno ? errno : EPROTO; + } + + SET_NEXT_STATE (%^FINISH_COMMAND); } return 0; diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 9dcc898..f1d421d 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -228,13 +228,16 @@ ty...
2012 Apr 24
1
Error compiling pigeonhole 0.3.0 with dovecot-2.1.5 in openbsd 5.0
...nction-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/include -MT managesieve-parser.o -MD -MP -MF .deps/managesieve-parser.Tpo -c -o managesieve-parser.o managesieve-parser.c managesieve-parser.c: In function 'quoted_string_istream_read': managesieve-parser.c:639: error: 'EPROTO' undeclared (first use in this function) managesieve-parser.c:639: error: (Each undeclared identifier is reported only once managesieve-parser.c:639: error: for each function it appears in.) *** Error code 1 Stop in /home/seajob/build/dovecot-2.1-pigeonhole-0.3.0/src/lib-managesieve...
2019 Jun 25
2
Few libnbd questions/concerns
Here are few things I found out when using libnbd that might be perfectly fine or maybe just an oversight, but I wanted to point them out. It's nothing major. When running a program with `nbdkit -U - --run ...`, the $nbd parameter gets expanded to nbd:unix:/path/to/socket. When this string is passed to nbd_connect_uri(), it does not return an error (even though it is not a valid URL), but
2010 Nov 24
1
[LLVMdev] llvm build breakage on OpenBSD after adding system_error
...c092..2c0fa5c 100644 --- a/include/llvm/System/system_error.h +++ b/include/llvm/System/system_error.h @@ -470,6 +470,16 @@ template <> struct hash<std::error_code>; # endif #endif +#ifndef EBADMSG +# define EBADMSG 104 +#endif +#ifndef ENOLINK +# define ENOLINK 121 +#endif +#ifndef EPROTO +# define EPROTO 134 +#endif + namespace llvm { template <class T, T v>
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass closures + user_data + free function in single struct parameters as I described previously in this email: https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile simplification if you buy into 1 & 2. Patch 4 adds another macro which is