Displaying 8 results from an estimated 8 matches for "libnbd_size_minimum".
2020 Oct 17
1
[libnbd PATCH] info: Keep request within 4G bound
...ffset;
+ 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 = offset;
- if (nbd_block...
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 Jul 24
0
[libnbd PATCH 3/3] nbdinfo: Expose block size constraints
...* 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 ("\t%s: %s\n", &...
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...cription (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}) != -1)
+ show_context = tru...
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 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good
testsuite coverage and demonstrable performance improvement to
nbdinfo, I'm going ahead and pushing this now. We may still want to
add further nbd_opt_* commands for other fine-grained tuning of
negotiation, but for now, I think things have stabilized on this end,
and I can return to polishing .list_exports on the nbdkit
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.
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a
single nbd connection for all cases when reading the heads of the
file is not required), but I'm happy with patches 1-11, and 12-13
show where I'm headed for getting NBD_OPT_INFO to work. Posting
now to see if some of the earlier patches are ready to commit while
I continue working on the latter half.
Eric Blake (13):