search for: vddk_after_fork

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

2020 Jun 22
0
[PATCH nbdkit 2/2] vddk: Defer library initialization to .after_fork().
...checked in .get_ready that the library is dlopenable. + * + * For various hangs and failures which were caused by background + * threads and fork see: + * https://bugzilla.redhat.com/show_bug.cgi?id=1846309#c9 + * https://www.redhat.com/archives/libguestfs/2019-April/msg00090.html + */ +static int +vddk_after_fork (void) +{ + VixError err; /* Initialize VDDK library. */ DEBUG_CALL ("VixDiskLib_InitEx", @@ -457,10 +476,6 @@ vddk_get_ready (void) return 0; } -#define vddk_config_help \ - "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ - &qu...
2020 Aug 05
0
[PATCH nbdkit] vddk: Relax threading model and enable multi-conn.
...about threading above. */ +static int +vddk_can_multi_conn (void *handle) +{ + struct vddk_handle *h = handle; + return h->readonly; +} + /* Get the file size. */ static int64_t vddk_get_size (void *handle) @@ -986,6 +1009,7 @@ static struct nbdkit_plugin plugin = { .after_fork = vddk_after_fork, .open = vddk_open, .close = vddk_close, + .can_multi_conn = vddk_can_multi_conn, .get_size = vddk_get_size, .pread = vddk_pread, .pwrite = vddk_pwrite, -- 2.27.0
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 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