Displaying 14 results from an estimated 14 matches for "nbdkit_extents_align".
Did you mean:
nbdkit_extents_aligned
2020 Jul 07
0
[nbdkit PATCH 2/3] extents: Add nbdkit_extents_aligned()
...9,24 @@ Returns the number of extents in the list.
Returns a copy of the C<i>'th extent.
+=head3 Enforcing alignment of an nbdkit_extents list
+
+A convenience function is provided to filters only which makes it
+easier to ensure that the client only encounters aligned extents.
+
+ int nbdkit_extents_aligned (struct nbdkit_next_ops *next_ops,
+ nbdkit_backend *nxdata,
+ uint32_t count, uint64_t offset,
+ uint32_t flags, uint32_t align,
+ struct nbdkit_extents *extents, int *err);
+
+Calls n...
2020 Jul 08
1
Re: [nbdkit PATCH 2/3] extents: Add nbdkit_extents_aligned()
On Tue, Jul 07, 2020 at 05:22:46PM -0500, Eric Blake wrote:
[...]
> +/* Compute aligned extents on behalf of a filter. */
> +int
> +nbdkit_extents_aligned (struct nbdkit_next_ops *next_ops,
> + nbdkit_backend *nxdata,
> + uint32_t count, uint64_t offset,
> + uint32_t flags, uint32_t align,
> + struct nbdkit_extents *exts, int *err)
> +{
> +...
2020 Jul 07
6
[RFC nbdkit PATCH 0/3] aligned .extents
...ne for today and wanted to at least document my ideas).
I might also add a convenience function for nbdkit_extents_offset,
since we have a number of filters that repeat the same code for
translating all extents from the plugin by an offset.
Eric Blake (3):
vector: Add VECT_remove
extents: Add nbdkit_extents_aligned()
RFC swab: Re-enable .extents
docs/nbdkit-filter.pod | 18 +++++++++
include/nbdkit-filter.h | 5 +++
common/utils/vector.h | 10 +++++
server/extents.c | 80 +++++++++++++++++++++++++++++++++++++-
server/nbdkit.syms | 1 +
common/utils/test-vector.c | 26 ++++...
2020 Aug 18
0
[PATCH nbdkit 8/9] include: Prefix all exports with NBDKIT_DLLEXPORT.
...start, uint64_t end);
-extern void nbdkit_extents_free (struct nbdkit_extents *);
-extern size_t nbdkit_extents_count (const struct nbdkit_extents *);
-extern struct nbdkit_extent nbdkit_get_extent (const struct nbdkit_extents *,
- size_t);
-extern int nbdkit_extents_aligned (struct nbdkit_next_ops *next_ops,
- nbdkit_backend *nxdata,
- uint32_t count, uint64_t offset,
- uint32_t flags, uint32_t align,
- struct nbdkit_extents *extent...
2020 Jul 07
0
[nbdkit PATCH 3/3] RFC swab: Re-enable .extents
...void *handle)
+swab_extents (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle, uint32_t count, uint64_t offset, uint32_t flags,
+ struct nbdkit_extents *extents, int *err)
{
- return 0;
+ if (!is_aligned (count, offset)) return -1;
+ return nbdkit_extents_aligned (next_ops, nxdata, count, offset, flags,
+ bits/8, extents, err);
}
/* Cache. */
@@ -223,7 +223,7 @@ static struct nbdkit_filter filter = {
.pwrite = swab_pwrite,
.trim = swab_trim,
.zero = swab_zero,
- .can_extents...
2020 Aug 27
0
[PATCH nbdkit 1/2] docs: Remove .list_exports from release notes for 1.22.
...release-notes-1.22.pod | 6 ------
1 file changed, 6 deletions(-)
diff --git a/docs/nbdkit-release-notes-1.22.pod b/docs/nbdkit-release-notes-1.22.pod
index f84e0e12..20af7ea3 100644
--- a/docs/nbdkit-release-notes-1.22.pod
+++ b/docs/nbdkit-release-notes-1.22.pod
@@ -165,12 +165,6 @@ New API C<nbdkit_extents_aligned> is a helper function for filters
that retrieves extents as needed until at least a certain range is
covered (Eric Blake).
-New C<.default_export> and C<.list_exports> callbacks, and new APIs
-C<nbdkit_add_export>, C<nbdkit_exports_new>, C<nbdkit_exports_free>...
2020 Jul 08
1
Re: [nbdkit PATCH 3/3] RFC swab: Re-enable .extents
...swab_extents (struct nbdkit_next_ops *next_ops, void *nxdata,
> + void *handle, uint32_t count, uint64_t offset, uint32_t flags,
> + struct nbdkit_extents *extents, int *err)
> {
> - return 0;
> + if (!is_aligned (count, offset)) return -1;
> + return nbdkit_extents_aligned (next_ops, nxdata, count, offset, flags,
> + bits/8, extents, err);
> }
>
> /* Cache. */
> @@ -223,7 +223,7 @@ static struct nbdkit_filter filter = {
> .pwrite = swab_pwrite,
> .trim = swab_trim,
> .zero...
2020 Aug 27
4
[PATCH nbdkit 0/2] Temporarily remove .list_exports for nbdkit 1.22
If you're following nbdkit development upstream you'll have seen that
we are still making changes to the .list_exports and related APIs.
The current .list_exports API upstream is not how it will look
finally. The latest set of proposals was here:
https://www.redhat.com/archives/libguestfs/2020-August/thread.html#00330
At the same time I'd like to do an nbdkit 1.22 (stable) release.
2020 Jul 09
0
[nbdkit PATCH] blocksize: Fix .extents when plugin changes type within minblock
...FREE struct nbdkit_extents *extents2 = NULL;
+ size_t i;
+ struct nbdkit_extent e;
+
+ extents2 = nbdkit_extents_new (ROUND_DOWN (offset, minblock),
+ ROUND_UP (offset + count, minblock));
+ if (extents2 == NULL) {
+ *err = errno;
+ return -1;
+ }
+
+ if (nbdkit_extents_aligned (next_ops, nxdata,
+ MIN (ROUND_UP (count, minblock), maxlen),
+ ROUND_DOWN (offset, minblock),
+ flags, minblock, extents2, err) == -1)
+ return -1;
+
+ for (i = 0; i < nbdkit_extents_count (extents2);...
2020 Aug 27
0
ANNOUNCE: nbdkit 1.22 - high performance NBD server
...wise be
stranded if the server forks into the background. The VDDK plugin now
defers VDDK library initialization til ".after_fork" because it is
thought that the library creates background threads especially when
accessing remote servers.
New API "nbdkit_extents_aligned" is a helper function for filters that
retrieves extents as needed until at least a certain range is covered
(Eric Blake).
New "nbdkit_is_tls" can be called to determine if TLS was negotiated on
the connection. Plugins could use this to hide certain ex...
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough
meat that I was able to test 'nbdkit eval' advertising multiple
exports with descriptions paired with 'qemu-nbd --list'.
Eric Blake (3):
server: Add exports list functions
server: Prepare to use export list from plugin
sh, eval: Add .list_exports support
Richard W.M. Jones (1):
server: Implement
2020 Aug 06
6
[nbdkit PATCH v2 0/5] .list_exports
Since v1:
- patch 1: check size limits
- patch 2: better handling of default export name canonicalization
- patch 3: support filters as well as plugins
- patch 4: new
- patch 5: rewrite sh parser, fix testsuite to actually work and
cover more cases (now that libnbd.git is fixed)
Eric Blake (4):
server: Add exports list functions
server: Prepare to use export list from plugin
log: Add
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
...*nxdata, int readonly);
+struct nbdkit_exports;
typedef int nbdkit_next_list_exports (nbdkit_backend *nxdata, int readonly,
int default_only,
struct nbdkit_exports *exports);
@@ -130,6 +131,10 @@ NBDKIT_EXTERN_DECL (int, nbdkit_extents_aligned,
struct nbdkit_extents *extents, int *err));
/* Export functions. */
+NBDKIT_EXTERN_DECL (int, nbdkit_add_export,
+ (struct nbdkit_exports *,
+ const char *name, const char *description));
+
struct nbdkit_export {
char *name;...
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw
This is the port to Windows using native Windows APIs (not MSYS or
Cygwin).
This patch series is at the point where it basically now works. I can
run the server with the memory plugin, and access it remotely using
guestfish, creating filesystems and so on without any apparent
problems.
Nevertheless there are many