Displaying 11 results from an estimated 11 matches for "guestfs_int_free_error_data_list".
2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...+{
+ struct error_cb_stack *p, *next_p;
+
+ free (error_data->last_error);
+ for (p = error_data->error_cb_stack; p != NULL; p = next_p) {
+ next_p = p->next;
+ free (p);
+ }
+ free (error_data);
+}
+
+/* Free all the error_data structs created for a particular handle. */
+void
+guestfs_int_free_error_data_list (guestfs_h *g)
+{
+ struct error_data *p, *next_p;
+
+ gl_lock_lock (g->error_data_list_lock);
+
+ for (p = g->error_data_list; p != NULL; p = next_p) {
+ next_p = p->next;
+ free_error_data (p);
+ }
+
+ g->error_data_list = NULL;
+
+ gl_lock_unlock (g->error_data_list_lo...
2015 Jun 06
0
[PATCH 3/5] threads: Use thread-local storage for errors.
...+{
+ struct error_cb_stack *p, *next_p;
+
+ free (error_data->last_error);
+ for (p = error_data->error_cb_stack; p != NULL; p = next_p) {
+ next_p = p->next;
+ free (p);
+ }
+ free (error_data);
+}
+
+/* Free all the error_data structs created for a particular handle. */
+void
+guestfs_int_free_error_data_list (guestfs_h *g)
+{
+ struct error_data *p, *next_p;
+
+ gl_lock_lock (g->error_data_list_lock);
+
+ for (p = g->error_data_list; p != NULL; p = next_p) {
+ next_p = p->next;
+ free_error_data (p);
+ }
+
+ g->error_data_list = NULL;
+
+ gl_lock_unlock (g->error_data_list_lo...
2018 Jun 15
1
[PATCH] fuse: fix build when not available
...a/lib/handle.c
+++ b/lib/handle.c
@@ -399,7 +399,9 @@ guestfs_close (guestfs_h *g)
free (g->hv);
free (g->backend);
free (g->backend_data);
+#if HAVE_FUSE
free (g->localmountpoint);
+#endif
guestfs_int_free_string_list (g->backend_settings);
free (g->append);
guestfs_int_free_error_data_list (g);
--
2.17.1
2020 Feb 05
1
[PATCH] properly initialize error_data_lock_list before use
...b/handle.c
@@ -88,6 +88,7 @@ guestfs_create_flags (unsigned flags, ...)
if (!g) return NULL;
gl_recursive_lock_init (g->lock);
+ gl_lock_init (g->error_data_list_lock);
g->state = CONFIG;
@@ -176,6 +177,7 @@ guestfs_create_flags (unsigned flags, ...)
free (g->append);
guestfs_int_free_error_data_list (g);
gl_tls_key_destroy (g->error_data);
+ gl_lock_destroy (g->error_data_list_lock);
gl_recursive_lock_destroy (g->lock);
free (g);
return NULL;
--
2.21.1 (Apple Git-122.3)
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here:
https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048
v2:
- Use a cleanup handler to release the lock.
- Rebase to upstream.
Note I have not fixed the problem(s) with error handling (patch 3).
2018 May 02
0
[PATCH v2] fuse: mount_local: Fix crash when called from Java binding.
...6..bc45d29b2 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -399,6 +399,7 @@ guestfs_close (guestfs_h *g)
free (g->hv);
free (g->backend);
free (g->backend_data);
+ free (g->localmountpoint);
guestfs_int_free_string_list (g->backend_settings);
free (g->append);
guestfs_int_free_error_data_list (g);
--
2.17.0
2018 Feb 28
0
[PATCH] lib: Don't abort if a signal handler calls exit(2) during a guestfs_* function.
...s_close: g->lock");
+ /* While we're debugging locks in libguestfs I want this to fail
+ * noisily.
+ */
+ abort ();
+ }
+
if (g->trace) {
const char trace_msg[] = "close";
@@ -403,21 +435,6 @@ guestfs_close (guestfs_h *g)
free (g->append);
guestfs_int_free_error_data_list (g);
gl_tls_key_destroy (g->error_data);
- r = glthread_recursive_lock_destroy (&g->lock);
- if (r != 0) {
- /* If pthread_mutex_destroy returns 16 (EBUSY), this indicates
- * that the lock is held somewhere. That means a programming
- * error if the main program is using...
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015:
v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html
v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html
I have rebased and tidied up the patches, fixing a few spelling
mistakes, but they are broadly the same as before. I also ran all the
tests, which pass.
As with the previous versions, this makes a change to the API, where
you
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a
quick 1.30 release soon, and save this patch, and also the extensive
changes proposed for the test suite[1], to after 1.30.
Currently it is not safe to use the same handle from multiple threads,
unless you implement your own mutexes. See:
http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads
These
2017 Jul 21
6
[PATCH v3 REPOST 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015:
v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html
v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html
This series was posted about 4 weeks ago:
v3: https://www.redhat.com/archives/libguestfs/2017-June/msg00287.html
There is no change in this series except I rebased it against current
upstream head and retested. Last time there
2018 Mar 01
7
[PATCH v3 0/6] v2v: Add -o rhv-upload output mode.
v2 -> v3:
- Lots of code cleanups.
- Documentation.
However this is still spooling the file into a temporary before the
upload. It turns out that fixing this is going to require a small
change to qemu.
Rich.