Displaying 5 results from an estimated 5 matches for "nbdkit_extents_clear".
2019 Mar 12
0
Re: [PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...turning data/allocated is fine even if it
> causes the client to be less efficient for reading holes that it could
> have otherwise skipped).
The idea behind making hole the default is that it makes the VDDK
plugin slightly easier to write. However the VDDK plugin as you say
could just call nbdkit_extents_clear() in this case.
The other argument for making hole default is that it makes the
_extents_map_ easier to write (as a hole would be implemented as an
empty map).
I take the point though and will think about this some more.
> > +The C<extents> callback has to fill in any allocated or ze...
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...us you shouldn't
+assume that C<nbdkit_extent_add> always adds exactly one more extent
+to the map.
+
+C<nbdkit_extent_add> returns C<0> on success or C<-1> on failure. On
+failure C<nbdkit_error> and/or C<nbdkit_set_error> has already been
+called.
+
+ void nbdkit_extents_clear (struct nbdkit_extents_map *extents_map);
+
+Clear the extents map. After this the map will have a single hole
+covering the entire disk.
+
+ int nbdkit_extents_foreach (const struct nbdkit_extents_map *extents_map,
+ int (*fn) (uint64_t offset, uint64_t length,
+...
2019 Mar 12
2
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
Second version based on nbdkit_extent* calls, as discussed here:
https://www.redhat.com/archives/libguestfs/2019-March/msg00033.html
Note in particular there is some subtlety about how filters would work
in this implementation. See docs/nbdkit-filter.pod for the details.
Rich.
2019 Mar 12
2
Re: [PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...t, but prototyping with an array for the initial cut
is less code complexity).
> +
> +C<nbdkit_extent_add> returns C<0> on success or C<-1> on failure. On
> +failure C<nbdkit_error> and/or C<nbdkit_set_error> has already been
> +called.
> +
> + void nbdkit_extents_clear (struct nbdkit_extents_map *extents_map);
> +
> +Clear the extents map. After this the map will have a single hole
> +covering the entire disk.
> +
> + int nbdkit_extents_foreach (const struct nbdkit_extents_map *extents_map,
> + int (*fn) (uint64_t of...
2019 Mar 13
2
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...c raised in:
https://www.redhat.com/archives/libguestfs/2019-March/msg00038.html
https://www.redhat.com/archives/libguestfs/2019-March/msg00040.html
In particular:
- default state of extents_map is all allocated disk
- support hole + non-zero
- you can now iterate with bounds
- removed the nbdkit_extents_clear function; the name is
confusing and it doesn't seem like it would be useful
- lots of doc changes and clarifications
Rich.