Displaying 20 results from an estimated 58 matches for "debug_call".
2019 Apr 29
0
[nbdkit PATCH 1/3] vddk: Use a separate handle for single-link=true
...nbuffered)
flags |= VIXDISKLIB_FLAG_OPEN_UNBUFFERED;
@@ -538,6 +537,21 @@ vddk_open (int readonly)
nbdkit_debug ("transport mode: %s",
VixDiskLib_GetTransportMode (h->handle));
+ if (single_link) {
+ flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
+
+ DEBUG_CALL ("VixDiskLib_Open",
+ "connection, %s, %d, &handle_single_link", filename, flags);
+ err = VixDiskLib_Open (h->connection, filename, flags, &h->handle_single_link);
+ if (err != VIX_OK) {
+ VDDK_ERROR (err, "VixDiskLib_Open: %...
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
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 Aug 06
0
[PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...eadonly)
- flags |= VIXDISKLIB_FLAG_OPEN_READ_ONLY;
+ h->flags |= VIXDISKLIB_FLAG_OPEN_READ_ONLY;
if (single_link)
- flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
+ h->flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
if (unbuffered)
- flags |= VIXDISKLIB_FLAG_OPEN_UNBUFFERED;
-
- DEBUG_CALL ("VixDiskLib_Open",
- "connection, %s, %d, &handle", filename, flags);
- err = VixDiskLib_Open (h->connection, filename, flags, &h->handle);
- if (err != VIX_OK) {
- VDDK_ERROR (err, "VixDiskLib_Open: %s", filename);
- goto err2;
- }...
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 Mar 20
0
[PATCH nbdkit 7/8] vddk: Implement extents.
...catedBlocks == NULL, "
+ "probably this is VDDK < 6.7");
+ return 0;
+ }
+
+ /* However even when the call is available it rarely works well so
+ * the best thing we can do here is to try the call and if it's
+ * non-functional return false.
+ */
+ DEBUG_CALL ("VixDiskLib_QueryAllocatedBlocks",
+ "handle, 0, %d sectors, %d sectors",
+ VIXDISKLIB_MIN_CHUNK_SIZE, VIXDISKLIB_MIN_CHUNK_SIZE);
+ err = VixDiskLib_QueryAllocatedBlocks (h->handle,
+ 0, VIXDISKLIB_MIN_CHUNK...
2019 Mar 23
2
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...NBDKIT_EXTENT_HOLE | NBDKIT_EXTENT_ZERO) == -1)
> + goto error_in_add;
> + }
> +
> + if (nbdkit_add_extent (extents,
> + offset, length, 0 /* allocated data */) == -1) {
> + error_in_add:
> + DEBUG_CALL ("VixDiskLib_FreeBlockList", "block_list");
> + VixDiskLib_FreeBlockList (block_list);
> + return -1;
> + }
> +
> + position = offset + length;
This inner loop might be long; you could add this:
if (req_one)
break;
> + }
> +...
2020 Aug 06
3
Re: [PATCH nbdkit 2/2] vddk: Relax thread model to PARALLEL and implement a disk handle pool.
...PEN_READ_ONLY;
> + h->flags |= VIXDISKLIB_FLAG_OPEN_READ_ONLY;
> if (single_link)
> - flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
> + h->flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
> if (unbuffered)
> - flags |= VIXDISKLIB_FLAG_OPEN_UNBUFFERED;
> -
> - DEBUG_CALL ("VixDiskLib_Open",
> - "connection, %s, %d, &handle", filename, flags);
> - err = VixDiskLib_Open (h->connection, filename, flags, &h->handle);
> - if (err != VIX_OK) {
> - VDDK_ERROR (err, "VixDiskLib_Open: %s", filename);...
2012 Mar 28
2
[PATCH v2] New APIs: mount-local and umount-local using FUSE
This version doesn't crash or cause hung processes or stuck
mountpoints, so that's an improvement.
Rich.
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review.
It enables FUSE support in the API via two new calls,
'guestfs_mount_local' and 'guestfs_umount_local'.
FUSE turns out to be very easy to deadlock (necessitating that the
machine be rebooted). Running the test from the third patch is
usually an effective way to demonstrate this. However I have not yet
managed to produce a simple reproducer that
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
2012 Mar 29
3
[PATCH v3] New APIs: mount-local, mount-local-run and umount-local using FUSE
This changes the proposed API slightly.
Previously 'mount-local' generating a 'mounted' event when the
filesystem was ready, and from the 'mounted' event you had to
effectively do a fork.
Now, 'mount-local' just initializes the mountpoint and you have to
call 'mount-local-run' to enter the FUSE main loop. Between these
calls you can do a fork or whatever
2020 May 07
1
[PATCH nbdkit] vddk: Suppress errors in can_extents test (RHBZ#1709211).
...{
+ 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,12 +164,37 @@ debug_function (const char *fs, va...
2019 Mar 25
0
Re: [PATCH nbdkit 7/8] vddk: Implement extents.
...EXTENT_HOLE | NBDKIT_EXTENT_ZERO) == -1)
> > + goto error_in_add;
> > + }
> > +
> > + if (nbdkit_add_extent (extents,
> > + offset, length, 0 /* allocated data */) == -1) {
> > + error_in_add:
> > + DEBUG_CALL ("VixDiskLib_FreeBlockList", "block_list");
> > + VixDiskLib_FreeBlockList (block_list);
> > + return -1;
> > + }
> > +
> > + position = offset + length;
>
> This inner loop might be long; you could add this:
>
>...
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...use->uid, (uintmax_t) fuse->gid,
+ (uintmax_t) statbuf.st_uid, (uintmax_t) statbuf.st_gid,
statbuf.st_mode,
ok ? "OK" : "EACCESS");
@@ -402,7 +402,7 @@ mount_local_mknod (const char *path, mode_t mode, dev_t rdev)
{
int r;
DECL_G ();
- DEBUG_CALL ("%s, 0%o, 0x%lx", path, mode, (long) rdev);
+ DEBUG_CALL ("%s, 0%o, 0x%jx", path, mode, (uintmax_t) rdev);
if (g->ml_read_only) return -EROFS;
@@ -548,7 +548,7 @@ mount_local_chown (const char *path, uid_t uid, gid_t gid)
{
int r;
DECL_G ();
- DEBUG_CALL (&qu...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...use->uid, (uintmax_t) fuse->gid,
+ (uintmax_t) statbuf.st_uid, (uintmax_t) statbuf.st_gid,
statbuf.st_mode,
ok ? "OK" : "EACCESS");
@@ -402,7 +402,7 @@ mount_local_mknod (const char *path, mode_t mode, dev_t rdev)
{
int r;
DECL_G ();
- DEBUG_CALL ("%s, 0%o, 0x%lx", path, mode, (long) rdev);
+ DEBUG_CALL ("%s, 0%o, 0x%jx", path, mode, (uintmax_t) rdev);
if (g->ml_read_only) return -EROFS;
@@ -548,7 +548,7 @@ mount_local_chown (const char *path, uid_t uid, gid_t gid)
{
int r;
DECL_G ();
- DEBUG_CALL (&qu...
2020 Aug 06
1
Re: [PATCH nbdkit 1/2] vddk: Relax threading model: SERIALIZE_ALL_REQUESTS -> SERIALIZE_REQUESTS.
...gt; 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
>
>
2013 Dec 12
3
[PATCH] fuse: provide a stub "flush" implementation (RHBZ#660687).
...txt
diff --git a/src/fuse.c b/src/fuse.c
index 967a744..748b933 100644
--- a/src/fuse.c
+++ b/src/fuse.c
@@ -876,6 +876,20 @@ mount_local_removexattr(const char *path, const char *name)
return 0;
}
+static int
+mount_local_flush(const char *path, struct fuse_file_info *fi)
+{
+ DECL_G ();
+ DEBUG_CALL ("%s", path);
+
+ /* Just a stub. This method is called whenever FUSE wants to flush the
+ * pending changes (f.ex. to attributes) to a file. Since we don't have
+ * anything to do and don't want FUSE to think something went badly,
+ * just return 0.
+ */
+ return 0;
+}...
2023 Aug 30
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...plugins/sh/call.c
index 888c6459..79c67a04 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -34,6 +34,7 @@
#include <assert.h>
#include <fcntl.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -130,6 +131,7 @@ debug_call (const char **argv)
*/
static int
call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */
+ bool *pipe_full, /* set if wbuf not fully written */
string *rbuf, /* read from stdout */
string *ebuf, /...
2019 Apr 05
2
[PATCH nbdkit] vddk: Add support for VIXDISKLIB_FLAG_OPEN_SINGLE_LINK
...= r;
+ }
else {
nbdkit_error ("unknown parameter '%s'", key);
return -1;
@@ -464,6 +472,8 @@ vddk_open (int readonly)
flags = 0;
if (readonly)
flags |= VIXDISKLIB_FLAG_OPEN_READ_ONLY;
+ if (single_link)
+ flags |= VIXDISKLIB_FLAG_OPEN_SINGLE_LINK;
DEBUG_CALL ("VixDiskLib_Open",
"connection, %s, %d, &handle", filename, flags);
--
2.20.1