search for: nbdkit_extents_foreach_range

Displaying 4 results from an estimated 4 matches for "nbdkit_extents_foreach_range".

2019 Mar 13
2
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
I'm not sure which version we're up to now. Anyway I believe this addresses all the points that Eric 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 -
2019 Mar 13
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...and/or C<nbdkit_set_error> has already been +called. + + int nbdkit_extents_foreach ( + const struct nbdkit_extents_map *extents_map, + int (*fn) (uint64_t offset, uint64_t length, + uint32_t type, void *opaque), + void *opaque); + + int nbdkit_extents_foreach_range ( + const struct nbdkit_extents_map *extents_map, + uint64_t range_offset, uint64_t range_length, + int (*fn) (uint64_t offset, uint64_t length, + uint32_t type, void *opaque), + void *opaque); + +Iterate over the extents in ascendi...
2019 Mar 19
0
[PATCH nbdkit 1/9] server: Implement extents/can_extents calls for plugins and filters.
..._flagged = false; + +/* Stub for linking against server/extents.c. */ +void +nbdkit_error (const char *fs, ...) +{ + error_flagged = true; +} + +static int +compare (uint64_t offset, uint64_t length, uint32_t type, void *mapv) +{ + const struct nbdkit_extents_map *map = mapv; + size_t j; + + /* nbdkit_extents_foreach_range should ensure this is true even if + * there are extents which go below or above the range. + */ + assert (offset >= 0); + assert (offset + length <= DISK_SIZE); + + fprintf (stderr, + "compare: offset=%" PRIu64 " length=%" PRIu64 " " +...
2019 Mar 19
15
[PATCH nbdkit 0/9] [mainly for discussion and early review] Implement extents.
I want to post this but mainly for discussion and early review. It's not safe for these patches to all go upstream yet (because not all filters have been checked/adjusted), but if any patches were to go upstream then probably 1 & 2 only are safe. File, VDDK, memory and data plugins all work, although I have only done minimal testing on them. The current tests, such as they are, all