search for: add_extent

Displaying 16 results from an estimated 16 matches for "add_extent".

2019 Apr 29
5
[nbdkit PATCH 0/3] Fix data integrity in vddk plugin
Couple of fixes to return correct data and one nice-to-have clean-up which is not needed. I just find it nicer to read. Martin Kletzander (3): vddk: Use a separate handle for single-link=true vddk: Do not report hole extents to be zero with single-link=true vddk: Eliminate one needless goto plugins/vddk/vddk.c | 48 +++++++++++++++++++++++++++++++++------------ 1 file changed, 36
2019 Apr 23
2
Re: [PATCH nbdkit v5 FINAL 14/19] data, memory: Implement extents.
...TENT_ZERO; > + else { > + if (is_zero (p, n)) > + /* A backing page and it's all zero, it's a zero extent. */ > + type = NBDKIT_EXTENT_ZERO; > + else > + /* Normal allocated data. */ > + type = 0; > + } > + if (nbdkit_add_extent (extents, offset, n, type) == -1) > + return -1; > + ...to here, after the final nbdkit_add_extent, so that we can return a larger extent than the client's request. I remember when I originally asked, you declined due to odd interactions with REQ_ONE semantics, but since then, we ch...
2020 Mar 23
6
[PATCH nbdkit 0/3] msys2 support for review
I pushed a few of the msys2 patches upstream. I changed the way that $(SHARED_LDFLAGS) works so it's more to my liking, and the others were pushed unchanged. Three patches remain which I'm posting on the mailing list for proper review. Rich.
2019 Apr 24
2
Re: [PATCH nbdkit v5 FINAL 14/19] data, memory: Implement extents.
On 4/23/19 4:49 PM, Richard W.M. Jones wrote: >> >> ...to here, after the final nbdkit_add_extent, so that we can return a >> larger extent than the client's request. I remember when I originally >> asked, you declined due to odd interactions with REQ_ONE semantics, but >> since then, we changed how add_extent() works. Does it work now to defer >> the clamping? >...
2020 Mar 23
0
[PATCH nbdkit 1/3] include: Function indirection for PE DLL
...t_verror (const char *msg, va_list args) ATTRIBUTE_FORMAT_PRINTF (1, 0); @@ -113,9 +118,133 @@ extern const char *nbdkit_export_name (void); extern int nbdkit_peer_name (struct sockaddr *addr, socklen_t *addrlen); extern void nbdkit_shutdown (void); -struct nbdkit_extents; extern int nbdkit_add_extent (struct nbdkit_extents *, uint64_t offset, uint64_t length, uint32_t type); +#else +static void nbdkit_error (const char *msg, ...) + ATTRIBUTE_FORMAT_PRINTF (1, 2); +static void nbdkit_error (const char *msg, ...) +{ + va_list args; + va_start(args, msg); + _nbdk...
2019 Apr 23
0
Re: [PATCH nbdkit v5 FINAL 14/19] data, memory: Implement extents.
...if (is_zero (p, n)) > > + /* A backing page and it's all zero, it's a zero extent. */ > > + type = NBDKIT_EXTENT_ZERO; > > + else > > + /* Normal allocated data. */ > > + type = 0; > > + } > > + if (nbdkit_add_extent (extents, offset, n, type) == -1) > > + return -1; > > + > > ...to here, after the final nbdkit_add_extent, so that we can return a > larger extent than the client's request. I remember when I originally > asked, you declined due to odd interactions with REQ_ONE se...
2019 Apr 29
0
[nbdkit PATCH 2/3] vddk: Do not report hole extents to be zero with single-link=true
...r <mkletzan@redhat.com> --- plugins/vddk/vddk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 8cf54f6e2b96..cda670325b85 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -773,9 +773,17 @@ static int add_extent (struct nbdkit_extents *extents, uint64_t *position, uint64_t next_position, bool is_hole) { - const uint32_t type = is_hole ? NBDKIT_EXTENT_HOLE|NBDKIT_EXTENT_ZERO : 0; + uint32_t type = 0; const uint64_t length = next_position - *position; + if (is_hole) { + type = NBDKIT...
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
...ctions->read_password = nbdkit_read_password; + functions->realpath = nbdkit_realpath; + functions->nanosleep = nbdkit_nanosleep; + functions->export_name = nbdkit_export_name; + functions->peer_name = dummy_peer_name; + functions->shutdown = nbdkit_shutdown; + functions->add_extent = nbdkit_add_extent; + functions->extents_new = nbdkit_extents_new; + functions->extents_free = nbdkit_extents_free; + functions->extents_count = nbdkit_extents_count; + functions->get_extent = nbdkit_get_extent; +} +#endif + int main (int argc, char *argv[]) { @@ -178,6 +222,9 @...
2019 Mar 27
2
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...ocks[i].length * VIXDISKLIB_SECTOR_SIZE; > > > + > > > + /* The query returns blocks. We must insert holes between the > > > + * blocks as necessary. > > > + */ > > > + if (position < offset) { > > > + if (nbdkit_add_extent (extents, > > > + offset, length, > > > + NBDKIT_EXTENT_HOLE | NBDKIT_EXTENT_ZERO) == -1) > > > + goto error_in_add; > > > + } > > > + > > > + if (nbdkit_add_extent (...
2019 Apr 24
0
Re: [PATCH nbdkit v5 FINAL 14/19] data, memory: Implement extents.
On Tue, Apr 23, 2019 at 07:59:52PM -0500, Eric Blake wrote: > On 4/23/19 4:49 PM, Richard W.M. Jones wrote: > > >> > >> ...to here, after the final nbdkit_add_extent, so that we can return a > >> larger extent than the client's request. I remember when I originally > >> asked, you declined due to odd interactions with REQ_ONE semantics, but > >> since then, we changed how add_extent() works. Does it work now to defer > >>...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...ng (py_offset); > + extent_length = PyLong_AsUnsignedLongLong (py_length); > + extent_type = PyLong_AsUnsignedLong (py_type); > + if (check_python_failure ("PyLong") == -1) { > + Py_DECREF (r); > + return -1; > + } > + if (nbdkit_add_extent (extents, > + extent_offset, extent_length, extent_type) == -1) { Based on this nbdkit really does not need a list, only way to iterate on client response and call add_extent for each item. This is exactly the use case for generator functions. > + Py_DECRE...
2019 Mar 23
3
Re: [PATCH nbdkit 1/8] server: Implement extents/can_extents calls for plugins and filters.
On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > This pair of calls allows plugins to describe which extents in the > virtual disk are allocated, holes or zeroes. > --- I see you've already made a couple of tweaks to your block-status branch since posting this (skipping 0-legnth add_extent, and coalescing consecutive add_extents with the same type), but here's some more review: > +++ b/docs/nbdkit-filter.pod > +It is also possible for filters to transform the extents list received > +back from the layer below. Without error checking it would look like > +this: >...
2003 Jun 17
11
New Module app_perl
I just made my first 2 modules for asterisk (The 1st one is depriciated already). I was annoyed that i couldn't get GotoIf to take any expressions besides a boolean then i made a module to mimic gotoif and parse a few expressions like (${var} > 12) exten => 1,1,gotoif_expr,${var} > 12:1|4:1|5 Then I immediatly obseleted it with this new embedded perl module that lets you
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here so we have a reference in the mailing list in case we find bugs later (as I'm sure we will - it's a complex patch series). Great thanks to Eric Blake for tireless review on this one. It also seems to have identified a few minor bugs in qemu along the way. Rich.
2019 Mar 20
15
[PATCH nbdkit 0/8] Implement extents using a simpler array.
Not sure what version we're up to, but this reimplements extents using the new simpler structure described in this thread: https://www.redhat.com/archives/libguestfs/2019-March/msg00077.html I also fixed most of the things that Eric pointed out in the previous review, although I need to go back over his replies and check I've got everything. This needs a bit more testing. However the
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...nt_offset = PyLong_AsUnsignedLongLong (py_offset); + extent_length = PyLong_AsUnsignedLongLong (py_length); + extent_type = PyLong_AsUnsignedLong (py_type); + if (check_python_failure ("PyLong") == -1) { + Py_DECREF (r); + return -1; + } + if (nbdkit_add_extent (extents, + extent_offset, extent_length, extent_type) == -1) { + Py_DECREF (r); + return -1; + } + } + + Py_DECREF (r); + } + else { + nbdkit_error ("%s not implemented", "extents"); + return -1; + } + + return 0; +...