Displaying 7 results from an estimated 7 matches for "nbd_get_block_size".
2020 Jul 24
0
[libnbd PATCH 3/3] nbdinfo: Expose block size constraints
...red, block_maximum;
/* Collect the metadata we are going to display. */
size = nbd_get_size (nbd);
@@ -288,6 +289,9 @@ list_one_export (struct nbd_handle *nbd)
can_multi_conn = nbd_can_multi_conn (nbd);
can_trim = nbd_can_trim (nbd);
can_zero = nbd_can_zero (nbd);
+ block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
+ block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
+ block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
if (!json_output) {
printf ("export=");
@@ -317,6 +321,12 @@ list_one_export (struct nbd_handle *nbd)
printf...
2020 Oct 17
1
[libnbd PATCH] info: Keep request within 4G bound
...uint64_t offset, prev_offset;
+ uint64_t offset, prev_offset, align, max_len;
/* Did we get the requested map? */
if (!nbd_can_meta_context (nbd, map)) {
@@ -276,6 +278,8 @@ main (int argc, char *argv[])
progname, map);
exit (EXIT_FAILURE);
}
+ align = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM) ?: 512;
+ max_len = UINT32_MAX - align + 1;
size = nbd_get_size (nbd);
if (size == -1) {
@@ -286,7 +290,7 @@ main (int argc, char *argv[])
if (json_output) fprintf (fp, "[\n");
for (offset = 0; offset < size;) {
prev_offset = of...
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...desc = nbd_get_export_description (nbd);
- content = get_content (nbd, size);
is_rotational = nbd_is_rotational (nbd);
is_read_only = nbd_is_read_only (nbd);
can_cache = nbd_can_cache (nbd);
@@ -401,6 +435,12 @@ list_one_export (struct nbd_handle *nbd, const char *desc,
block_minimum = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM);
block_preferred = nbd_get_block_size (nbd, LIBNBD_SIZE_PREFERRED);
block_maximum = nbd_get_block_size (nbd, LIBNBD_SIZE_MAXIMUM);
+ if (nbd_opt_list_meta_context (nbd, (nbd_context_callback) {
+ .callback = collect_context, .user_data = &contexts}) != -...
2020 Jul 24
4
[libnbd PATCH 0/3] Expose server block size constraints
Necessary when writing a client that wants to avoid unnecessary EINVAL
errors from sending unaligned requests.
At some point, we may want to add synchronous convenience API wrappers
that do request splitting or read-modify-write to obey server
constraints while still appearing to the library client as accepting
any possible request. But such a wrapper should only be synchronous
and not copied to
2020 Aug 25
0
ANNOUNCE: libnbd 1.4 - high performance NBD client library
...t_info(3)
nbd_opt_info(3)
During the negotiating state, request full information about the
server export.
nbd_aio_opt_list(3)
nbd_opt_list(3)
During the negotiating state, request the list of exports that the
server provides.
nbd_get_block_size(3)
Return the minimum, preferred or maximum block size constraints for
requests sent to the server.
nbd_get_canonical_export_name(3)
Return the canonical export name that the server defaults to. This
information may only be available if you call...
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a
lot of testsuite coverage as well as putting the new API to use in
nbdinfo.
Eric Blake (2):
api: Add nbd_opt_list_meta_context
info: List available meta-contexts
lib/internal.h | 1 +
generator/API.ml | 84 ++++++++-
2020 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as
mentioned by Eric Blake in the commit message here:
https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd
The patch series is rather long because it detours through adding the
<vector.h> library from nbdkit into libnbd and replacing ad hoc uses
of realloc, char ** etc in various places.
Rich.