Displaying 20 results from an estimated 9515 matches for "callback's".
2023 Jul 14
2
[libnbd PATCH 1/2] api: Tighten rules on completion.callback
On Fri, Jul 14, 2023 at 09:13:42AM +0200, Laszlo Ersek wrote:
> On 7/13/23 21:29, Eric Blake wrote:
> > The documentation has claimed since commit 6f4dcdab that any
> > completion callback will be called exactly once; but this is not
> > consistent with the code: if nbd_aio_* itself returns an error, then
> > nothing is queued and the user does not need to wait for a completion
> > callback to know how the command failed. We could tweak the generator
> > to c...
2019 Aug 15
2
Re: [PATCH libnbd v2 04/10] lib: Permit .callback = NULL, .free != NULL.
On 8/15/19 4:56 AM, Richard W.M. Jones wrote:
> Previously the .free function of a callback was not called if the
> .callback field was NULL, because the callback as a whole would be
> considered to be "null".
>
> This change allows you to register callbacks where the .callback field
> is NULL, but the .free field is != NULL, meaning that the callback is
> fre...
2023 May 07
5
[PATCH 00/53] drm: Convert to platform remove callback returning void
Hello,
this patch series adapts the platform drivers below drivers/gpu/drm
to use the .remove_new() callback. Compared to the traditional .remove()
callback .remove_new() returns no value. This is a good thing because
the driver core doesn't (and cannot) cope for errors during remove. The
only effect of a non-zero return value in .remove() is that the driver
core emits a warning. The device is removed...
2023 Jul 16
1
[libnbd PATCH 1/2] api: Tighten rules on completion.callback
On 7/14/2023 4:13 PM, Eric Blake wrote:
> On Fri, Jul 14, 2023 at 09:13:42AM +0200, Laszlo Ersek wrote:
>> On 7/13/23 21:29, Eric Blake wrote:
>>> The documentation has claimed since commit 6f4dcdab that any
>>> completion callback will be called exactly once; but this is not
>>> consistent with the code: if nbd_aio_* itself returns an error, then
>>> nothing is queued and the user does not need to wait for a completion
>>> callback to know how the command failed. We could tweak the generator
>&...
2019 Aug 15
0
[PATCH libnbd v2 04/10] lib: Permit .callback = NULL, .free != NULL.
Previously the .free function of a callback was not called if the
.callback field was NULL, because the callback as a whole would be
considered to be "null".
This change allows you to register callbacks where the .callback field
is NULL, but the .free field is != NULL, meaning that the callback is
freed after the last time it woul...
2019 Jul 30
3
[PATCH libnbd] lib: Remove cookie parameter from completion callbacks.
...| 57 +++++++++++++------
generator/states-reply.c | 2 +-
generator/states.c | 2 +-
lib/aio.c | 2 +-
lib/internal.h | 2 +-
.../test_505_aio_pread_structured_callback.ml | 3 +-
python/t/505-aio-pread-callback.py | 3 +-
tests/closure-lifetimes.c | 3 +-
tests/server-death.c | 2 +-
12 files changed, 55 insertions(+), 39 deletions(-)
diff --git a/docs/libnbd.pod b/docs/libnbd.pod
index 25d31f9..55dd74d...
2023 Mar 16
1
[PATCH v3 08/11] vdpa: Add eventfd for the vdpa callback
? 2023/2/28 17:41, Xie Yongji ??:
> Add eventfd for the vdpa callback so that user
> can signal it directly instead of running the
> callback. It will be used for vhost-vdpa case.
>
> Signed-off-by: Xie Yongji <xieyongji at bytedance.com>
> ---
> drivers/vhost/vdpa.c | 2 ++
> drivers/virtio/virtio_vdpa.c | 1 +
> include/lin...
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass
closures + user_data + free function in single struct parameters as I
described previously in this email:
https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html
Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile
simplification if you buy into 1 & 2.
Patch 4 adds another macro which is less obviously useful.
Rich.
2019 Oct 17
3
[PATCH V4 3/6] mdev: introduce device specific ops
...:48:33 +0800
Jason Wang <jasowang at redhat.com> wrote:
> Currently, except for the create and remove, the rest of
> mdev_parent_ops is designed for vfio-mdev driver only and may not help
> for kernel mdev driver. With the help of class id, this patch
> introduces device specific callbacks inside mdev_device
> structure. This allows different set of callback to be used by
> vfio-mdev and virtio-mdev.
>
> Signed-off-by: Jason Wang <jasowang at redhat.com>
> ---
> .../driver-api/vfio-mediated-device.rst | 25 +++++----
> MAINTAINERS...
2019 Oct 17
3
[PATCH V4 3/6] mdev: introduce device specific ops
...:48:33 +0800
Jason Wang <jasowang at redhat.com> wrote:
> Currently, except for the create and remove, the rest of
> mdev_parent_ops is designed for vfio-mdev driver only and may not help
> for kernel mdev driver. With the help of class id, this patch
> introduces device specific callbacks inside mdev_device
> structure. This allows different set of callback to be used by
> vfio-mdev and virtio-mdev.
>
> Signed-off-by: Jason Wang <jasowang at redhat.com>
> ---
> .../driver-api/vfio-mediated-device.rst | 25 +++++----
> MAINTAINERS...
2017 Aug 03
1
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...gt; On 08/03/2017 04:13 PM, Pankaj Gupta wrote:
> >>
> >> + /* Allocate space for find_vqs parameters */
> >> + vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
> >> + if (!vqs)
> >> + goto err_vq;
> >> + callbacks = kmalloc_array(nvqs, sizeof(*callbacks), GFP_KERNEL);
> >> + if (!callbacks)
> >> + goto err_callback;
> >> + names = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);
> >
> > is size here (integer) i...
2017 Aug 03
1
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...gt; On 08/03/2017 04:13 PM, Pankaj Gupta wrote:
> >>
> >> + /* Allocate space for find_vqs parameters */
> >> + vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
> >> + if (!vqs)
> >> + goto err_vq;
> >> + callbacks = kmalloc_array(nvqs, sizeof(*callbacks), GFP_KERNEL);
> >> + if (!callbacks)
> >> + goto err_callback;
> >> + names = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);
> >
> > is size here (integer) i...
2010 Apr 27
4
Patch sensible callback framework
This patch adds a simple callback framework.
Modified loadfile and floadfile to look for callbacks and call them if present
Supports multiple callbacks
Modified com32/modules/linux.c to demonstrate functionality (it's a little more complicated than it should be just to demonstrate multiple callbacks). Add progress argume...
2019 Aug 14
4
[libnbd PATCH 0/2] Fix test 505
Rich found that I had been using bogus logic, but it was hidden by
other bugs in our language bindings until recently.
Eric Blake (2):
python: Fix test 505
ocaml: Fix test 505
python/t/505-aio-pread-callback.py | 14 +++++++-------
.../test_505_aio_pread_structured_callback.ml | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
--
2.20.1
2019 Jul 11
1
Re: [libnbd] Slight API inconsistency
On Thu, Jul 11, 2019 at 09:35:02AM -0500, Eric Blake wrote:
>On 7/11/19 9:23 AM, Martin Kletzander wrote:
>> The callback (e.g. for `nbd_block_status`) now has a support for returning
>> errors thanks to the last parameter (`int *error`), so it was switched to
>> returning void.
>
>No, the callback still returns int. Where are you seeing it return
>void, because that's wrong. The documentati...
2019 Jul 16
1
[libnbd PATCH] generator: Prefer closure opaque after function pointer in C
Existing practice tends to prefer the void* closure argument for C
callbacks to occur after the function pointer (POSIX: pthread_create;
glibc: qsort_r; glib: g_thread_new; libvirt:
virConnectDomainEventRegisterAny; etc.). It's also handy to think that
calling 'myfunc(cb, arg)' will eventually result in a call to
'cb(arg)'. While I couldn't quickly...
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
When using the nbd_aio_FOO_callback commands, there is nothing further
to be learned about the command by calling nbd_aio_command_completed()
compared to what the callback already had access to. There are still
scenarios where manually retiring the command after the fact is useful
(whether the return was 0 to keep the status unchang...
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...STFS_EVENT_LAUNCH_DONE 0x0004
#define GUESTFS_EVENT_PROGRESS 0x0008
#define GUESTFS_EVENT_APPLIANCE 0x0010
#define GUESTFS_EVENT_LIBRARY 0x0020
#define GUESTFS_EVENT_TRACE 0x0040
#define GUESTFS_EVENT_ALL UINT64_MAX
#ifndef GUESTFS_TYPEDEF_EVENT_CALLBACK
#define GUESTFS_TYPEDEF_EVENT_CALLBACK 1
typedef void (*guestfs_event_callback) (
guestfs_h *g,
void *opaque,
uint64_t event,
int event_handle,
int flags,...
2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
Change the way that we deal with freeing closures in language
bindings:
* The valid_flag is removed (mostly reverting
commit 2d9b98e96772e282d51dafac07f16387dadc8afa).
* An extra ‘free’ parameter is added to all callback structures. This
is called by the library whenever the closure won't be called again
(so the user_data can be freed). This is analogous to valid_flag ==
LIBNBD_CALLBACK_FREE in old code.
* Language bindings are updated to deal with these changes.
---
TODO...
2019 Jul 16
2
[PATCH libnbd] generator: Define new Closure type
** INCOMPLETE **
This is the generator change as discussed on the list already.
The Python and OCaml bindings are not yet done.
It passes all [C only] tests and valgrind.
Note that nbd_add_close_callback is inconsistent with other closure
types because it passes the user_data parameter after the function.
(This is not caused by the current patch, it was already
inconsistent). We decided that nbd_add_close_callback should be
manually generated and not automatically generated because it should
only...