search for: vddk_close

Displaying 17 results from an estimated 17 matches for "vddk_close".

2020 Aug 05
0
[PATCH nbdkit] vddk: Relax threading model and enable multi-conn.
...7,6 +580,7 @@ vddk_open (int readonly) return NULL; } + h->readonly = readonly; h->params = allocate_connect_params (); if (h->params == NULL) { nbdkit_error ("allocate VixDiskLibConnectParams: %m"); @@ -649,6 +663,7 @@ vddk_open (int readonly) static void vddk_close (void *handle) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h = handle; DEBUG_CALL ("VixDiskLib_Close", "handle"); @@ -659,6 +674,14 @@ vddk_close (void *handle) free (h); } +/* Allow multi-conn - see comment about threading abov...
2020 Aug 05
2
[PATCH nbdkit] vddk: Relax threading model and enable multi-conn.
In theory this patch depends on this series: https://www.redhat.com/archives/libguestfs/2020-August/msg00021.html In practice I believe they're independent of each other, but the above series makes it easier to test. Rich.
2020 Aug 06
1
Re: [PATCH nbdkit 1/2] vddk: Relax threading model: SERIALIZE_ALL_REQUESTS -> SERIALIZE_REQUESTS.
...kLibConnectParams *params) > static void * > vddk_open (int readonly) > { > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > struct vddk_handle *h; > VixError err; > uint32_t flags; > @@ -616,6 +624,7 @@ vddk_open (int readonly) > static void > vddk_close (void *handle) > { > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > struct vddk_handle *h = handle; > > DEBUG_CALL ("VixDiskLib_Close", "handle"); > -- > 2.27.0 > >
2020 Feb 13
2
[nbdkit PATCH] vddk: Make 'file=' a magic key
...struct nbdkit_plugin plugin = { .config = vddk_config, .config_complete = vddk_config_complete, .config_help = vddk_config_help, + .magic_config_key = "file", .dump_plugin = vddk_dump_plugin, .open = vddk_open, .close = vddk_close, diff --git a/tests/test-vddk.sh b/tests/test-vddk.sh index d99ebf88..6933f716 100755 --- a/tests/test-vddk.sh +++ b/tests/test-vddk.sh @@ -48,8 +48,7 @@ grep ^vddk_default_libdir= test-vddk.out # a load that we know will fail, but the important part is that dlopen's # error message lists an...
2020 Aug 06
5
[PATCH nbdkit NOT WORKING 0/2] vddk: Relax threading model.
I believe this roughly implements Nir's proposal here: https://www.redhat.com/archives/libguestfs/2020-August/msg00028.html Unfortunately it doesn't work for me. It actually slows things down quite a lot, for reasons I don't understand. Note the adjustment of the pool-max parameter and how it affects the total time. The results are quite reproducible. $ ./nbdkit -r -U - vddk
2020 Aug 06
0
[PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...name) \ + __attribute__((cleanup (put_vddk_handle))) \ + struct vddk_handle *name##_h = get_vddk_handle (h); \ + if (name##_h == NULL) return -1; \ + VixDiskLibHandle name = name##_h->vddk_handle + /* Free up the per-connection handle. */ static void vddk_close (void *handle) { ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); - struct vddk_handle *h = handle; + struct handle *h = handle; + size_t i; - DEBUG_CALL ("VixDiskLib_Close", "handle"); - VixDiskLib_Close (h->handle); + for (i = 0; i < h->vddk_handles....
2020 Jun 22
0
[PATCH nbdkit 2/2] vddk: Defer library initialization to .after_fork().
...plugin (void) { @@ -959,6 +974,7 @@ static struct nbdkit_plugin plugin = { .magic_config_key = "file", .dump_plugin = vddk_dump_plugin, .get_ready = vddk_get_ready, + .after_fork = vddk_after_fork, .open = vddk_open, .close = vddk_close, .get_size = vddk_get_size, -- 2.25.0
2020 Aug 06
0
[PATCH nbdkit 1/2] vddk: Relax threading model: SERIALIZE_ALL_REQUESTS -> SERIALIZE_REQUESTS.
...{ @@ -524,6 +531,7 @@ free_connect_params (VixDiskLibConnectParams *params) static void * vddk_open (int readonly) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h; VixError err; uint32_t flags; @@ -616,6 +624,7 @@ vddk_open (int readonly) static void vddk_close (void *handle) { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); struct vddk_handle *h = handle; DEBUG_CALL ("VixDiskLib_Close", "handle"); -- 2.27.0
2019 Apr 29
0
[nbdkit PATCH 1/3] vddk: Use a separate handle for single-link=true
...+ VDDK_ERROR (err, "VixDiskLib_Open: %s", filename); + goto err2; + } + + nbdkit_debug ("transport mode for single_link: %s", + VixDiskLib_GetTransportMode (h->handle_single_link)); + } + return h; err2: @@ -559,6 +573,10 @@ vddk_close (void *handle) free_connect_params (h->params); DEBUG_CALL ("VixDiskLib_Close", "handle"); VixDiskLib_Close (h->handle); + if (single_link) { + DEBUG_CALL ("VixDiskLib_Close", "handle_single_link"); + VixDiskLib_Close (h->handle_singl...
2020 Feb 17
0
Re: [nbdkit PATCH] vddk: Make 'file=' a magic key
...; .config = vddk_config, > .config_complete = vddk_config_complete, > .config_help = vddk_config_help, > + .magic_config_key = "file", > .dump_plugin = vddk_dump_plugin, > .open = vddk_open, > .close = vddk_close, > diff --git a/tests/test-vddk.sh b/tests/test-vddk.sh > index d99ebf88..6933f716 100755 > --- a/tests/test-vddk.sh > +++ b/tests/test-vddk.sh > @@ -48,8 +48,7 @@ grep ^vddk_default_libdir= test-vddk.out > # a load that we know will fail, but the important part is that dlopen...
2020 Aug 06
3
Re: [PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...nup (put_vddk_handle))) \ > + struct vddk_handle *name##_h = get_vddk_handle (h); \ > + if (name##_h == NULL) return -1; \ > + VixDiskLibHandle name = name##_h->vddk_handle > + > /* Free up the per-connection handle. */ > static void > vddk_close (void *handle) > { > ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&open_close_lock); > - struct vddk_handle *h = handle; > + struct handle *h = handle; > + size_t i; > > - DEBUG_CALL ("VixDiskLib_Close", "handle"); > - VixDiskLib_Close (h->handle); &gt...
2020 Feb 17
1
Re: [nbdkit PATCH] vddk: Make 'file=' a magic key
..._config, > > .config_complete = vddk_config_complete, > > .config_help = vddk_config_help, > > + .magic_config_key = "file", > > .dump_plugin = vddk_dump_plugin, > > .open = vddk_open, > > .close = vddk_close, > > diff --git a/tests/test-vddk.sh b/tests/test-vddk.sh > > index d99ebf88..6933f716 100755 > > --- a/tests/test-vddk.sh > > +++ b/tests/test-vddk.sh > > @@ -48,8 +48,7 @@ grep ^vddk_default_libdir= test-vddk.out > > # a load that we know will fail, but the im...
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 Oct 11
3
[PATCH NOT WORKING nbdkit v2 0/2] vddk: Restructure plugin to allow greater parallelism.
This is my second attempt at this. The first version (also not working) was here: https://www.redhat.com/archives/libguestfs/2019-October/msg00062.html In part 1/2 I introduce a new .ready_to_serve plugin method which is called after forking and just before accepting any client connection. The idea would be that plugins could start background threads here. However this doesn't work well in
2019 Oct 10
1
[PATCH NOT WORKING nbdkit] vddk: Restructure plugin to allow greater parallelism.
We had a query yesterday about the VDDK plugin and making it actually obey the weird "Multithreading Considerations" rules in the VDDK documentation (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8f96698a-0e7b-4d67-bb6c-d18a1d101540/ef536a47-27cd-481a-90ef-76b38e75353c/vsphere-vddk-671-programming-guide.pdf) This patch is my attempt to implement this. The idea is that the
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete method before to do two different things (complete configuration; do any allocation/housekeeping necessary before we can start serving). The only questions in my mind are whether we want this before 1.18, and whether the name ("get_ready") is a good one. Rich.
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
If you have a plugin which either creates background threads itself or uses a library that creates background threads, it turns out you cannot create these in .get_ready (or earlier). The reason is that nbdkit forks when either daemonizing itself or using the --run option, and fork cancels all the background threads in the child process (the daemonized or captive nbdkit). The only good solution