Displaying 12 results from an estimated 12 matches for "extents_to_block_descriptor".
Did you mean:
extents_to_block_descriptors
2019 May 21
1
[PATCH nbdkit] protocol: Fix base:allocation replies when req_one is not set.
I pushed this one already. It should go into the stable-1.12 branch too.
Rich.
2023 Jul 16
1
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
...was not negotiated",
| @@ -536,7 +536,7 @@ send_structured_reply_block_status (uint64_t cookie,
| size_t i;
| int r;
|
| - assert (conn->meta_context_base_allocation);
| + // assert (conn->meta_context_base_allocation);
| assert (cmd == NBD_CMD_BLOCK_STATUS);
|
| blocks = extents_to_block_descriptors (extents, flags, count, offset,
plus this sequence:
$ patched/nbdkit memory 1M
$ ./run nbdsh --opt-mode -u nbd://localhost
nbd> h.set_request_meta_context(False)
nbd> h.set_export_name('a')
nbd> def c(arg):
... pass
...
nbd> h.opt_set_meta_context_queries(['base:allocat...
2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
...CMD_READ);
@@ -442,7 +442,7 @@ send_structured_reply_read (struct connection *conn,
/* Convert a list of extents into NBD_REPLY_TYPE_BLOCK_STATUS blocks.
* The rules here are very complicated. Read the spec carefully!
*/
-static struct block_descriptor *
+static struct nbd_block_descriptor *
extents_to_block_descriptors (struct nbdkit_extents *extents,
uint16_t flags,
uint32_t count, uint64_t offset,
@@ -451,13 +451,14 @@ extents_to_block_descriptors (struct nbdkit_extents *extents,
const bool req_one = flags & NBD_CMD_FLAG_REQ_ONE;
const siz...
2023 Jul 16
2
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
...536,7 @@ send_structured_reply_block_status (uint64_t cookie,
> | size_t i;
> | int r;
> |
> | - assert (conn->meta_context_base_allocation);
> | + // assert (conn->meta_context_base_allocation);
> | assert (cmd == NBD_CMD_BLOCK_STATUS);
> |
> | blocks = extents_to_block_descriptors (extents, flags, count, offset,
>
> plus this sequence:
>
> $ patched/nbdkit memory 1M
> $ ./run nbdsh --opt-mode -u nbd://localhost
> nbd> h.set_request_meta_context(False)
> nbd> h.set_export_name('a')
> nbd> def c(arg):
> ... pass
> ...
> nb...
2019 Nov 02
2
[PATCH nbdkit] server: Use GCC hints to move debug and error handling code out of hot paths.
...("system lacks atomic CLOEXEC, serializing to avoid fd leaks");
thread_model = NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS;
}
#endif
diff --git a/server/protocol.c b/server/protocol.c
index 89fbdfa..f6ea35c 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -508,8 +508,8 @@ extents_to_block_descriptors (struct nbdkit_extents *extents,
#if 0
for (i = 0; i < *nr_blocks; ++i)
- nbdkit_debug ("block status: sending block %" PRIu32 " type %" PRIu32,
- blocks[i].length, blocks[i].status_flags);
+ debug ("block status: sending block %" PRIu3...
2019 Jun 25
4
Re: Few libnbd questions/concerns
On 6/25/19 8:14 AM, Richard W.M. Jones wrote:
> On Tue, Jun 25, 2019 at 02:58:34PM +0200, Martin Kletzander wrote:
>> 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
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 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's
version 4.
I'm a lot happier with this version:
- all filters have been reviewed and changed where I think that's necessary
- can_extents is properly defined and implemented now
- NBD protocol is followed
- I believe it addresses all previous review points where possible
The "only" thing
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...conn->send (buf, count, 0);
if (r == -1) {
nbdkit_error ("write data: %s: %m", name_of_nbd_cmd (cmd));
- return connection_set_status (conn, -1);
+ return connection_set_status (-1);
}
return 1; /* command processed ok */
@@ -522,12 +522,12 @@ extents_to_block_descriptors (struct nbdkit_extents *extents,
}
static int
-send_structured_reply_block_status (struct connection *conn,
- uint64_t handle,
+send_structured_reply_block_status (uint64_t handle,
uint16_t cmd, uint16_t flags,...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html
v2 replaces
struct connection *conn = GET_CONN;
with
GET_CONN;
which sets conn implicitly and asserts that it is non-NULL.
If we actually want to test if conn is non-NULL or behave
differently, then you must use threadlocal_get_conn() instead,
and some existing uses do that.
Rich.
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of
passing around struct connection * entirely within the server,
preferring instead to reference the connection through thread-local
storage.
I hope this is a gateway to simplifying other parts of the code.
Rich.
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here
so we have a reference in the mailing list in case we find bugs later
(as I'm sure we will - it's a complex patch series).
Great thanks to Eric Blake for tireless review on this one. It also
seems to have identified a few minor bugs in qemu along the way.
Rich.