search for: name_of_nbd_error

Displaying 20 results from an estimated 20 matches for "name_of_nbd_error".

2019 Apr 23
0
[nbdkit PATCH 7/7] nbd: Implement structured replies
...d_mark_dead (h); - if (be32toh (rep.magic) != NBD_SIMPLE_REPLY_MAGIC) + switch (be32toh (rep.simple.magic)) { + case NBD_SIMPLE_REPLY_MAGIC: + nbdkit_debug ("received simple reply for cookie %#" PRIx64 ", status %s", + rep.simple.handle, + name_of_nbd_error(be32toh (rep.simple.error))); + error = be32toh (rep.simple.error); + break; + case NBD_STRUCTURED_REPLY_MAGIC: + if (!h->structured) { + nbdkit_error ("structured response without negotiation"); + return nbd_mark_dead (h); + } + if (read_full (h->fd, sizeo...
2019 Sep 24
0
[PATCH nbdkit 2/4] common/protocol: Remove protostrings.sed, use bash+sed instead.
...MD_FLAG_NO_HOLE (1<<1) #define NBD_CMD_FLAG_DF (1<<2) @@ -233,7 +224,6 @@ extern const char *name_of_nbd_cmd_flag (int); /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb */ -extern const char *name_of_nbd_error (int); #define NBD_SUCCESS 0 #define NBD_EPERM 1 #define NBD_EIO 5 diff --git a/common/protocol/protostrings.h b/common/protocol/protostrings.h new file mode 100644 index 0000000..8029652 --- /dev/null +++ b/common/protocol/protostrings.h @@ -0,0 +1,51 @@ +/* nbdkit + * Copyrig...
2018 Dec 06
10
[PATCH nbdkit 0/5] protocol: Generate map functions from NBD protocol flags to printable strings.
With some crufty sed scripts we can generate functions that map from NBD protocol flags (eg. NBD_CMD_READ) to strings ("NBD_CMD_READ"). This works on GNU sed and with FreeBSD, also with GNU sed's --posix option, so I guess the sed code is POSIX-compatible. Rich.
2018 Dec 07
0
[nbdkit PATCH 6/5] nbd: More debug details
...turn nbd_mark_dead (h); if (be32toh (rep.magic) != NBD_REPLY_MAGIC) return nbd_mark_dead (h); - nbdkit_debug ("received reply for cookie %#" PRIx64, rep.handle); + nbdkit_debug ("received reply for cookie %#" PRIx64 ", status %s", + rep.handle, name_of_nbd_error(be32toh (rep.error))); trans = find_trans_by_cookie (h, rep.handle); if (!trans) { nbdkit_error ("reply with unexpected cookie %#" PRIx64, rep.handle); diff --git a/plugins/nbd/Makefile.am b/plugins/nbd/Makefile.am index e998a28..9f08057 100644 --- a/plugins/nbd/Makefile.am +++...
2019 Apr 23
12
[nbdkit PATCH 0/7] Implement structured replies in nbd plugin
I'm hoping to implement .extents for the nbd plugin; this is a prerequisite. I'm not sure about patch 3 - if we like it, I'll squash it to 2, if we don't, I think we are okay just dropping it. I'm also wondering if we have to worry about malicious plugins that don't populate the entire .pread buffer in an effort to get nbdkit to expose portions of the heap; my patch 7 loses
2019 Apr 25
6
[nbdkit PATCH v2 0/5] structured replies/.extents for nbd plugin
Updated based on other changes that have happened in the meantime: - rely more on cleanup.h (throughout) - split structured read for easier review (patch 2 and 3 were combined in v1) - rely on nbdkit not leaking a server's partial answer (patch 3) - add tests (patch 5) - other bug fixes I found while testing it - drop EOVERFLOW patch for now; it will be separate once upstream NBD protocol
2019 Mar 08
0
Re: [PATCH nbdkit] Minimal implementation of NBD Structured Replies.
...turn nbd_mark_dead (h); > - if (be32toh (rep.magic) != NBD_REPLY_MAGIC) > + if (be32toh (rep.magic) != NBD_SIMPLE_REPLY_MAGIC) > return nbd_mark_dead (h); > nbdkit_debug ("received reply for cookie %#" PRIx64 ", status %s", > rep.handle, name_of_nbd_error(be32toh (rep.error))); Teaching the nbd plugin to negotiate structured replies as the client is obviously a separate patch, I'm fine if you leave that to me :) > +static int > +send_structured_reply_read (struct connection *conn, > + uint64_t handle, uint16...
2018 Dec 07
1
Re: [nbdkit PATCH 6/5] nbd: More debug details
...gt; if (be32toh (rep.magic) != NBD_REPLY_MAGIC) > return nbd_mark_dead (h); > - nbdkit_debug ("received reply for cookie %#" PRIx64, rep.handle); > + nbdkit_debug ("received reply for cookie %#" PRIx64 ", status %s", > + rep.handle, name_of_nbd_error(be32toh (rep.error))); > trans = find_trans_by_cookie (h, rep.handle); > if (!trans) { > nbdkit_error ("reply with unexpected cookie %#" PRIx64, rep.handle); > diff --git a/plugins/nbd/Makefile.am b/plugins/nbd/Makefile.am > index e998a28..9f08057 100644 > ---...
2019 Mar 08
2
[PATCH nbdkit] Minimal implementation of NBD Structured Replies.
...zeof rep) < 0) return nbd_mark_dead (h); - if (be32toh (rep.magic) != NBD_REPLY_MAGIC) + if (be32toh (rep.magic) != NBD_SIMPLE_REPLY_MAGIC) return nbd_mark_dead (h); nbdkit_debug ("received reply for cookie %#" PRIx64 ", status %s", rep.handle, name_of_nbd_error(be32toh (rep.error))); diff --git a/server/connections.c b/server/connections.c index 51d4912..aeb27f8 100644 --- a/server/connections.c +++ b/server/connections.c @@ -86,6 +86,7 @@ struct connection { bool can_fua; bool can_multi_conn; bool using_tls; + bool structured_replies; int...
2019 Sep 24
0
[PATCH nbdkit 1/4] common/protocol: Rename protocol.h to nbd-protocol.h.
....da2e0d0 100644 --- a/common/protocol/protocol.h +++ b/common/protocol/nbd-protocol.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef NBDKIT_PROTOCOL_H -#define NBDKIT_PROTOCOL_H +#ifndef NBD_PROTOCOL_H +#define NBD_PROTOCOL_H #include <stdint.h> @@ -244,4 +244,4 @@ extern const char *name_of_nbd_error (int); #define NBD_ENOTSUP 95 #define NBD_ESHUTDOWN 108 -#endif /* NBDKIT_PROTOCOL_H */ +#endif /* NBD_PROTOCOL_H */ diff --git a/common/protocol/protostrings.sed b/common/protocol/protostrings.sed index 1731c6b..cb1a76e 100644 --- a/common/protocol/protostrings.sed +++ b/common/protocol/pro...
2018 Dec 06
0
[PATCH nbdkit 3/5] protocol: Generate map functions from NBD protocol flags to printable strings.
...6 +extern const char *name_of_nbd_cmd_flag (int); #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb */ +extern const char *name_of_nbd_error (int); #define NBD_SUCCESS 0 #define NBD_EPERM 1 #define NBD_EIO 5 diff --git a/.gitignore b/.gitignore index 86ef6cb..8cfe734 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ Makefile.in /podwrapper.pl /src/nbdkit /src/nbdkit.pc +/src/protostrings.c /src/synopsis...
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...return nbdplug_mark_dead (h); - rep.simple.magic = be32toh (rep.simple.magic); - switch (rep.simple.magic) { - case NBD_SIMPLE_REPLY_MAGIC: - nbdkit_debug ("received simple reply for cookie %#" PRIx64 ", status %s", - rep.simple.handle, - name_of_nbd_error (be32toh (rep.simple.error))); - error = be32toh (rep.simple.error); - break; - case NBD_STRUCTURED_REPLY_MAGIC: - if (!h->structured) { - nbdkit_error ("structured response without negotiation"); - return nbdplug_mark_dead (h); - } - if (read_full (h->fd,...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...return nbdplug_mark_dead (h); - rep.simple.magic = be32toh (rep.simple.magic); - switch (rep.simple.magic) { - case NBD_SIMPLE_REPLY_MAGIC: - nbdkit_debug ("received simple reply for cookie %#" PRIx64 ", status %s", - rep.simple.handle, - name_of_nbd_error (be32toh (rep.simple.error))); - error = be32toh (rep.simple.error); - break; - case NBD_STRUCTURED_REPLY_MAGIC: - if (!h->structured) { - nbdkit_error ("structured response without negotiation"); - return nbdplug_mark_dead (h); - } - if (read_full (h->fd,...
2020 Mar 19
1
[nbdkit PATCH] nbd: Drop nbd-standalone fallback
...- return nbd_mark_dead (h); - rep.simple.magic = be32toh (rep.simple.magic); - switch (rep.simple.magic) { - case NBD_SIMPLE_REPLY_MAGIC: - nbdkit_debug ("received simple reply for cookie %#" PRIx64 ", status %s", - rep.simple.handle, - name_of_nbd_error (be32toh (rep.simple.error))); - error = be32toh (rep.simple.error); - break; - case NBD_STRUCTURED_REPLY_MAGIC: - if (!h->structured) { - nbdkit_error ("structured response without negotiation"); - return nbd_mark_dead (h); - } - if (read_full (h->fd, size...
2019 Sep 24
11
[PATCH nbdkit 0/4] common/protocol: Unify public <nbd-protocol.h>
We should have only one NBD protocol file. Let's make nbdkit's version the canonical one, and use it in libnbd. Rich.
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package: https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17 Note that comment 21 provides a newer package 0.1.1-1 with a different API; and that libnbd has more unreleased API changes in the pipeline (whether that will be called 0.2 or 0.1.2); so we'll have to tweak things based on what is actually available in distros.
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing, although it was not compiled against libxml2 so it lacks uri support (I ended up testing patch 4 with a self-built libnbd). Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add URI support, better timing results Still not done - patch 5 needs associated tests Eric Blake (5): nbd: Check for libnbd nbd:
2019 Aug 23
1
[nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO
...e NBD_CMD_FLAG_DF (1<<2) +#define NBD_CMD_FLAG_REQ_ONE (1<<3) +#define NBD_CMD_FLAG_FAST_ZERO (1<<4) /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb @@ -239,6 +241,7 @@ extern const char *name_of_nbd_error (int); #define NBD_EINVAL 22 #define NBD_ENOSPC 28 #define NBD_EOVERFLOW 75 +#define NBD_ENOTSUP 95 #define NBD_ESHUTDOWN 108 #endif /* NBDKIT_PROTOCOL_H */ diff --git a/server/filters.c b/server/filters.c index 14ca0cc6..0dd2393e 100644 --- a/server/filters.c +++ b/server/filters...
2019 Jun 12
8
[nbdkit PATCH v3 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.4-1 is now available in Fedora 29/30 updates testing. Diffs since v2 - rebase to master, bump from libnbd 0.1.2 to 0.1.3+, add tests to TLS usage which flushed out the need to turn relative pathnames into absolute, doc tweaks Now that the testsuite covers TLS and libnbd has been fixed to provide the things I found lacking when developing v2, I'm leaning towards pushing this on
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a