search for: bufv

Displaying 20 results from an estimated 40 matches for "bufv".

Did you mean: buf
2011 Aug 25
4
[PATCH 0/3] ruby: Fix event handler failure
I won't pretend I really understand what's going on here. I've CC'd this message to Chris since he might have a better idea. https://bugzilla.redhat.com/show_bug.cgi?id=733297 In this bug, it appears that the event log callback goes out of scope and is garbage collected. (This is despite the fact we registered it as a global root). When we invoke the callback later,
2023 Feb 13
3
Issue with downloading files whose path contains multi-byte utf-8 characters
...=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug > settle -E \303by", len=len at entry=47) at proto.c:145 > #7 ?0x00007ffff6dfb759 in handle_log_message (g=g at entry=0xf31290, conn= > conn at entry=0x110e280) at conn-socket.c:395 > #8 ?0x00007ffff6dfbd63 in read_data (len=4, bufv=<optimized out>, connv= > <optimized out>, g=<optimized out>) at conn-socket.c:179 > #9 ?read_data (g=0xf31290, connv=0x110e280, bufv=<optimized out>, len=4) at > conn-socket.c:142 > #10 0x00007ffff6e1764a in recv_from_daemon (buf_rtn=0x7fffffffd858, size_rtn= &g...
2023 Feb 12
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...t entry=0xf31290, buf=0x113b8a0 "gs=0x0\r\ncommandrvf: udevadm --debug settle -E \303by", len=len at entry=47) at proto.c:145 #7 0x00007ffff6dfb759 in handle_log_message (g=g at entry=0xf31290, conn=conn at entry=0x110e280) at conn-socket.c:395 #8 0x00007ffff6dfbd63 in read_data (len=4, bufv=<optimized out>, connv=<optimized out>, g=<optimized out>) at conn-socket.c:179 #9 read_data (g=0xf31290, connv=0x110e280, bufv=<optimized out>, len=4) at conn-socket.c:142 #10 0x00007ffff6e1764a in recv_from_daemon (buf_rtn=0x7fffffffd858, size_rtn=0x7fffffffd854, g=0xf312...
2019 Aug 14
0
[PATCH libnbd 2/2] ocaml: Remove NBD.Buffer.free function, use the completion callback instead.
...en we need to + * register it as a global root and save that into the + * completion_callback.user_data so the root is removed on + * command completion. + *) + List.iter ( + function + | BytesPersistIn (n, _) | BytesPersistOut (n, _) -> + pr " completion_user_data->bufv = %sv;\n" n; + pr " caml_register_generational_global_root (&completion_user_data->bufv);\n" + | _ -> () + ) args; + let ret_c_type = C.type_of_ret ret and errcode = C.errcode_of_ret ret in pr " %s r;\n" ret_c_type; pr "\n"; @@ -5252...
2023 Feb 14
1
Issue with downloading files whose path contains multi-byte utf-8 characters
...47\232\204\303 available\r\ned to rvf:e run ?in, ignor data av", len=len at entry > =43) > ? ? at proto.c:145 > #5 ?0x00007f6dd166ac29 in handle_log_message (g=g at entry=0xae06f0, conn= > conn at entry=0xd19570) at conn-socket.c:395 > #6 ?0x00007f6dd166b233 in read_data (len=4, bufv=<optimized out>, connv= > <optimized out>, g=<optimized out>) at conn-socket.c:179 > #7 ?read_data (g=0xae06f0, connv=0xd19570, bufv=<optimized out>, len=4) at > conn-socket.c:142 > #8 ?0x00007f6dd1685c2a in recv_from_daemon (buf_rtn=0x7fffa95cc548, size_rtn= &gt...
2019 Jul 24
0
[PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.
...ct-structured-reads.c b/examples/strict-structured-reads.c index a996a67..2279301 100644 --- a/examples/strict-structured-reads.c +++ b/examples/strict-structured-reads.c @@ -53,7 +53,7 @@ static int total_success; static int read_chunk (unsigned valid_flag, void *opaque, const void *bufv, size_t count, uint64_t offset, - int status, int *error) + unsigned status, int *error) { struct data *data = opaque; struct range *r, **prev; diff --git a/generator/generator b/generator/generator index 34ca3f1..d46e8d6 100755 --- a/generator/generator +++ b/generator...
2019 Aug 14
4
[PATCH libnbd 0/2] Use free callback to dereference NBD.Buffer.
In this patch series we use the newly introduced free callback on the completion function to dererence the OCaml NBD.Buffer. I will make the same kind of change for Python later in a separate series. The completion function is always called at the C level, even if the OCaml program didn't use the optional argument. That's because the free callback doesn't run otherwise. There is a
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a regression test.
2014 Feb 13
3
Libguestfs (1.22.6) driver/changes for mingw/win32
Hi, I attached the changes I made to a vanilla libguestfs-1.22.6 in order to make it work in mingw/win32. Added is also the patch required to make QEMU compatible (add a command to QMP that lists the supported devices (the regilat way you do it print it to stderr, which is difficult to redirect in win32)). This is done on behalf of Intel Corp. Thanks, Or (oberon in irc)
2019 Jul 24
2
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...VALID)) return 0; > + > + // Rest of callback as normal. > + } Both examples are good. > +++ b/examples/strict-structured-reads.c > @@ -51,12 +51,16 @@ static int64_t total_bytes; > static int total_success; > > static int > -read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, > +read_chunk (int valid_flag, void *opaque, > + const void *bufv, size_t count, uint64_t offset, > int status, int *error) > { > struct data *data = opaque; > struct range *r, **prev; > > + if (!(valid_flag &...
2019 Jun 25
1
[libnbd PATCH] pread_structured: Change callback type to use Mutable error
...r ? error : EPROTO; } SET_NEXT_STATE(%FINISH); diff --git a/interop/structured-read.c b/interop/structured-read.c index cf8b893..46a7a80 100644 --- a/interop/structured-read.c +++ b/interop/structured-read.c @@ -47,7 +47,7 @@ struct data { static int read_cb (void *opaque, const void *bufv, size_t count, uint64_t offset, - int error, int status) + int *error, int status) { struct data *data = opaque; const char *buf = bufv; @@ -55,7 +55,7 @@ read_cb (void *opaque, const void *bufv, size_t count, uint64_t offset, /* The NBD spec allows chunks to be reordered;...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...ict-structured-reads.c b/examples/strict-structured-reads.c index a50f662..c154b08 100644 --- a/examples/strict-structured-reads.c +++ b/examples/strict-structured-reads.c @@ -51,12 +51,16 @@ static int64_t total_bytes; static int total_success; static int -read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, +read_chunk (int valid_flag, void *opaque, + const void *bufv, size_t count, uint64_t offset, int status, int *error) { struct data *data = opaque; struct range *r, **prev; + if (!(valid_flag & LIBNBD_CALLBACK_VALID)) + return...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On 8/12/19 11:08 AM, Richard W.M. Jones wrote: > This adds a C-only semi-private function for freeing various types of > persistent data passed to libnbd. > > There are some similarities with nbd_add_close_callback which we > removed in commit 7f191b150b52ed50098976309a6af883d245fc56. > --- > +=head1 FREE CALLBACKS > + > +B<Note:> The API described in this
2019 Aug 12
0
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...persistent buffers eventually looks like this: /* The function may save a reference to the Buffer, so we * must treat it as a possible GC root. */ value *buf_user_data; buf_user_data = malloc (sizeof (value)); if (buf_user_data == NULL) caml_raise_out_of_memory (); *buf_user_data = bufv; caml_register_generational_global_root (buf_user_data); struct nbd_buffer *buf_buf = NBD_buffer_val (bufv); const void *buf = buf_buf->data; size_t count = buf_buf->len; if (nbd_add_free_callback (h, (void *)buf, free_root, buf_user_data) == -1) cam...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...this: > > /* The function may save a reference to the Buffer, so we > * must treat it as a possible GC root. > */ > value *buf_user_data; > buf_user_data = malloc (sizeof (value)); > if (buf_user_data == NULL) caml_raise_out_of_memory (); > *buf_user_data = bufv; > caml_register_generational_global_root (buf_user_data); > struct nbd_buffer *buf_buf = NBD_buffer_val (bufv); > const void *buf = buf_buf->data; > size_t count = buf_buf->len; > if (nbd_add_free_callback (h, (void *)buf, > free_root,...
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...ict-structured-reads.c b/examples/strict-structured-reads.c index a50f662..a996a67 100644 --- a/examples/strict-structured-reads.c +++ b/examples/strict-structured-reads.c @@ -51,12 +51,16 @@ static int64_t total_bytes; static int total_success; static int -read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, +read_chunk (unsigned valid_flag, void *opaque, + const void *bufv, size_t count, uint64_t offset, int status, int *error) { struct data *data = opaque; struct range *r, **prev; + if (!(valid_flag & LIBNBD_CALLBACK_VALID)) + r...
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...ict-structured-reads.c b/examples/strict-structured-reads.c index 1a551a0..511dd7c 100644 --- a/examples/strict-structured-reads.c +++ b/examples/strict-structured-reads.c @@ -51,12 +51,16 @@ static int64_t total_bytes; static int total_success; static int -read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, +read_chunk (unsigned valid_flag, void *opaque, + const void *bufv, size_t count, uint64_t offset, unsigned status, int *error) { struct data *data = opaque; struct range *r, **prev; + if (!(valid_flag & LIBNBD_CALLBACK_VALID)) +...
2019 Jul 24
2
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...D_CALLBACK_VALID|LIBNBD_CALLBACK_FREE, meaning it's the > last valid call.) [1] In my previous reply, I assumed that the nbd_aio_FOO_callback function would use this paradigm... > +++ b/examples/strict-structured-reads.c > @@ -127,11 +131,14 @@ read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, > } > > static int > -read_verify (void *opaque, int64_t cookie, int *error) > +read_verify (int valid_flag, void *opaque, int64_t cookie, int *error) > { > struct data *data = opaque; > int ret = -1; > > + if (!(valid_flag...
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 Jul 24
0
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...g it's the > > last valid call.) > > [1] In my previous reply, I assumed that the nbd_aio_FOO_callback > function would use this paradigm... > > > > +++ b/examples/strict-structured-reads.c > > > @@ -127,11 +131,14 @@ read_chunk (void *opaque, const void *bufv, size_t count, uint64_t offset, > > } > > > > static int > > -read_verify (void *opaque, int64_t cookie, int *error) > > +read_verify (int valid_flag, void *opaque, int64_t cookie, int *error) > > { > > struct data *data = opaque; > > int r...