search for: nbd_block_descriptor

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

2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
...ruct fixed_new_option_reply_meta_context { +struct nbd_fixed_new_option_reply_meta_context { uint32_t context_id; /* metadata context ID */ /* followed by a string */ } __attribute__((packed)); /* NBD_REPLY_TYPE_BLOCK_STATUS block descriptor. */ -struct block_descriptor { +struct nbd_block_descriptor { uint32_t length; /* length of block */ uint32_t status_flags; /* block type (hole etc) */ } __attribute__((packed)); @@ -144,14 +157,14 @@ struct block_descriptor { /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. * Modern clients use NBD_OPT_GO in...
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 Sep 25
0
[libnbd PATCH] lib: Synchronize nbd-protocol.h with nbdkit, again
..._BIG NBD_REP_ERR (9) #define NBD_INFO_EXPORT 0 +#define NBD_INFO_NAME 1 +#define NBD_INFO_DESCRIPTION 2 +#define NBD_INFO_BLOCK_SIZE 3 /* NBD_INFO_EXPORT reply (follows fixed_new_option_reply). */ struct nbd_fixed_new_option_reply_info_export { @@ -160,15 +166,6 @@ struct nbd_block_descriptor { uint32_t status_flags; /* block type (hole etc) */ } NBD_ATTRIBUTE_PACKED; -/* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. - * Modern clients use NBD_OPT_GO instead of this. - */ -struct nbd_new_handshake_finish { - uint64_t exportsize; - uint16_t eflags;...
2019 Sep 24
0
[PATCH nbdkit 4/4] common/protocol: Install <nbd-protocol.h> as a public header.
...T reply (follows fixed_new_option_reply). */ struct nbd_fixed_new_option_reply_meta_context { uint32_t context_id; /* metadata context ID */ /* followed by a string */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; /* NBD_REPLY_TYPE_BLOCK_STATUS block descriptor. */ struct nbd_block_descriptor { uint32_t length; /* length of block */ uint32_t status_flags; /* block type (hole etc) */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. * Modern clients use NBD_OPT_GO instead of this. @@ -16...
2019 Sep 24
2
[PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
...T reply (follows fixed_new_option_reply). */ struct nbd_fixed_new_option_reply_meta_context { uint32_t context_id; /* metadata context ID */ /* followed by a string */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; /* NBD_REPLY_TYPE_BLOCK_STATUS block descriptor. */ struct nbd_block_descriptor { uint32_t length; /* length of block */ uint32_t status_flags; /* block type (hole etc) */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. * Modern clients use NBD_OPT_GO instead of this. @@ -16...
2020 Mar 19
1
[nbdkit PATCH] nbd: Drop nbd-standalone fallback
...eply_raw (struct handle *h, struct transaction **trans_out) -{ - union { - struct nbd_simple_reply simple; - struct nbd_structured_reply structured; - } rep; - struct transaction *trans; - void *buf = NULL; - CLEANUP_FREE char *payload = NULL; - uint32_t count; - uint32_t id; - struct nbd_block_descriptor *extents = NULL; - size_t nextents = 0; - int error = NBD_SUCCESS; - bool more = false; - uint32_t len = 0; /* 0 except for structured reads */ - uint64_t offset = 0; /* if len, absolute offset of structured read chunk */ - bool zero = false; /* if len, whether to read or memset */ - uint16_...
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...uint32_t count, uint64_t offset, struct nbdkit_extents *extents) { + struct connection *conn = GET_CONN; ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&conn->write_lock); struct nbd_structured_reply reply; CLEANUP_FREE struct nbd_block_descriptor *blocks = NULL; @@ -542,7 +542,7 @@ send_structured_reply_block_status (struct connection *conn, blocks = extents_to_block_descriptors (extents, flags, count, offset, &nr_blocks); if (blocks == NULL) - return connection_set_status (conn, -1); +...
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.