Displaying 10 results from an estimated 10 matches for "vddk_unload".
Did you mean:
vddk_load
2020 May 07
1
[PATCH nbdkit] vddk: Suppress errors in can_extents test (RHBZ#1709211).
...d the plugin. */
+static void
+vddk_load (void)
+{
+ int err;
+
+ err = pthread_key_create (&error_suppression, NULL);
+ if (err != 0) {
+ nbdkit_error ("vddk: pthread_key_create: %s\n", strerror (err));
+ exit (EXIT_FAILURE);
+ }
+}
+
+/* Unload the plugin. */
+static void
+vddk_unload (void)
+{
+ if (init_called) {
+ DEBUG_CALL ("VixDiskLib_Exit", "");
+ VixDiskLib_Exit ();
+ }
+ if (dl)
+ dlclose (dl);
+ free (config);
+ free (libdir);
+ free (password);
+ pthread_key_delete (error_suppression);
+}
+
static void
trim (char *str)
{
@@ -133,...
2020 Feb 13
4
[PATCH nbdkit v2 2/3] NOT WORKING: vddk: Drive library loading from libdir parameter.
I couldn't get this to work in the end. This is the latest
non-working version. This email documents what doesn't work for the
permanent record.
The central problem is that VDDK InitEx() appears to dlopen() various
of its own plugins. Although I wasn't able to capture exactly what
dlopen() command it is running, the plugins cannot be loaded because
they rely on the recompiled
2020 Feb 13
2
[PATCH nbdkit 1/2] vddk: Delay loading VDDK until config_complete.
...); \
- } \
- } while (0)
-#define OPTIONAL_STUB(fn,ret,args) fn = dlsym (dl, #fn)
-#include "vddk-stubs.h"
-#undef STUB
-#undef OPTIONAL_STUB
-}
-
+/* Unload the plugin. */
static void
vddk_unload (void)
{
@@ -289,6 +242,54 @@ vddk_config (const char *key, const char *value)
return 0;
}
+/* Load the VDDK library. */
+static void
+load_library (void)
+{
+ static const char *sonames[] = {
+ /* Prefer the newest library in case multiple exist. */
+ "libvixDiskLib.so.6",...
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
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
2020 Feb 17
5
[nbdkit PATCH v5 0/4] vddk: Drive library loading from libdir parameter.
Differences from v4:
Patch 1 is simplified: I realized that since we already use -rdynamic
for nbdkit (after all, we WANT our dlopen()d plugins to be able to
call our nbdkit_* exports), it is only a matter of adding dlopen to
the set of symbols that we export. With that done, there is no
separate shared library needed; our dlopen shim is now part of nbdkit
proper, and we don't have to tweak
2020 Feb 16
6
[nbdkit PATCH v4 0/4] vddk: Drive library loading from libdir parameter.
I'm a lot happier with this version: no mucking with dlmopen(). It
does add a bit more coupling between nbdkit proper and the vddk plugin
(namely, nbdkit now exports a new function that the vddk plugin relies
on), but patch 2 adds testsuite coverage of the new function so we
shouldn't regress.
Patch 1 and 2 are new, patch 3 is unchanged from when Rich posted it
in v2, and patch 4 is
2020 Feb 18
2
[nbdkit PATCH v6] vddk: Add re-exec with altered environment
...was InitEx called */
+static bool init_called = false; /* was InitEx called */
+static char *reexeced = false; /* did libdir require reexec */
static char *config = NULL; /* config */
static const char *cookie = NULL; /* cookie */
@@ -162,6 +164,8 @@ vddk_unload (void)
static int
vddk_config (const char *key, const char *value)
{
+ int r;
+
if (strcmp (key, "config") == 0) {
/* See FILENAMES AND PATHS in nbdkit-plugin(3). */
free (config);
@@ -199,12 +203,15 @@ vddk_config (const char *key, const char *value)
if (nbdkit_pars...
2020 Feb 18
4
[nbdkit PATCH v7 0/2] vddk: Drive library loading from libdir parameter.
In v7:
everything should work now! The re-exec code is slightly simplified,
with Rich's suggestion to pass the original LD_LIBRARY_PATH rather
than just the prefix being added, and I've now finished wiring up the
initial dlopen() check into code that correctly computes the right
prefix dir to add to LD_LIBRARY_PATH.
Eric Blake (1):
vddk: Add re-exec with altered environment
Richard
2020 Feb 13
1
[nbdkit PATCH v3] vddk: Drive library loading from libdir parameter.
...lopen handle */
+static void *shimdl = NULL; /* shim dlopen handle */
+static void *dl = NULL; /* vddk dlopen handle */
static int init_called = 0; /* was InitEx called */
static char *config = NULL; /* config */
@@ -153,6 +156,8 @@ vddk_unload (void)
}
if (dl)
dlclose (dl);
+ if (shimdl)
+ dlclose (shimdl);
free (config);
free (libdir);
free (password);
@@ -248,17 +253,67 @@ load_library (void)
{
static const char *sonames[] = {
/* Prefer the newest library in case multiple exist. */
+ "lib64/libv...