Remove patch which is now upstream.
This commit is contained in:
parent
dd974908f5
commit
f6bcd85c6f
@ -1,116 +0,0 @@
|
|||||||
From 5971fb2a70daf739dc73fe7d3525295011625cd9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 12 Sep 2013 09:16:31 +0100
|
|
||||||
Subject: [PATCH] virt-df: parallel: Send debugging messages to stderr.
|
|
||||||
|
|
||||||
Not stdout (ordinary program output) since that gets eaten by
|
|
||||||
the tests.
|
|
||||||
|
|
||||||
This fixes commit 67b9469754684bc0c79fffab7bbca9f6ffee84f0.
|
|
||||||
---
|
|
||||||
df/parallel.c | 35 +++++++++++++++++++----------------
|
|
||||||
1 file changed, 19 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/df/parallel.c b/df/parallel.c
|
|
||||||
index 1f56beb..ef31375 100644
|
|
||||||
--- a/df/parallel.c
|
|
||||||
+++ b/df/parallel.c
|
|
||||||
@@ -78,6 +78,8 @@ struct thread_data {
|
|
||||||
int
|
|
||||||
start_threads (size_t option_P, guestfs_h *options_handle, work_fn work)
|
|
||||||
{
|
|
||||||
+ const int trace = options_handle ? guestfs_get_trace (options_handle) : 0;
|
|
||||||
+ const int verbose = options_handle ? guestfs_get_verbose (options_handle) : 0;
|
|
||||||
size_t i, nr_threads;
|
|
||||||
int err, errors;
|
|
||||||
void *status;
|
|
||||||
@@ -91,19 +93,16 @@ start_threads (size_t option_P, guestfs_h *options_handle, work_fn work)
|
|
||||||
else
|
|
||||||
nr_threads = MIN (nr_domains, MIN (MAX_THREADS, estimate_max_threads ()));
|
|
||||||
|
|
||||||
+ if (verbose)
|
|
||||||
+ fprintf (stderr, "parallel: creating %zu threads\n", nr_threads);
|
|
||||||
+
|
|
||||||
struct thread_data thread_data[nr_threads];
|
|
||||||
pthread_t threads[nr_threads];
|
|
||||||
|
|
||||||
for (i = 0; i < nr_threads; ++i) {
|
|
||||||
thread_data[i].thread_num = i;
|
|
||||||
- if (options_handle) {
|
|
||||||
- thread_data[i].trace = guestfs_get_trace (options_handle);
|
|
||||||
- thread_data[i].verbose = guestfs_get_verbose (options_handle);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- thread_data[i].trace = 0;
|
|
||||||
- thread_data[i].verbose = 0;
|
|
||||||
- }
|
|
||||||
+ thread_data[i].trace = trace;
|
|
||||||
+ thread_data[i].verbose = verbose;
|
|
||||||
thread_data[i].work = work;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -138,7 +137,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
thread_data->r = 0;
|
|
||||||
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu starting\n", thread_data->thread_num);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu starting\n",
|
|
||||||
+ thread_data->thread_num);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
size_t i; /* The current domain we're working on. */
|
|
||||||
@@ -150,7 +150,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
|
|
||||||
/* Take the next domain from the list. */
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu waiting to get work\n", thread_data->thread_num);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu waiting to get work\n",
|
|
||||||
+ thread_data->thread_num);
|
|
||||||
|
|
||||||
err = pthread_mutex_lock (&take_mutex);
|
|
||||||
if (err != 0) {
|
|
||||||
@@ -170,7 +171,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu taking domain %zu\n", thread_data->thread_num, i);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu taking domain %zu\n",
|
|
||||||
+ thread_data->thread_num, i);
|
|
||||||
|
|
||||||
fp = open_memstream (&output, &output_len);
|
|
||||||
if (fp == NULL) {
|
|
||||||
@@ -202,8 +204,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
* may mean waiting for another thread to finish here.
|
|
||||||
*/
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu waiting to retire domain %zu\n",
|
|
||||||
- thread_data->thread_num, i);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu waiting to retire domain %zu\n",
|
|
||||||
+ thread_data->thread_num, i);
|
|
||||||
|
|
||||||
err = pthread_mutex_lock (&retire_mutex);
|
|
||||||
if (err != 0) {
|
|
||||||
@@ -221,7 +223,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu retiring domain %zu\n", thread_data->thread_num, i);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu retiring domain %zu\n",
|
|
||||||
+ thread_data->thread_num, i);
|
|
||||||
|
|
||||||
/* Retire domain. */
|
|
||||||
printf ("%s", output);
|
|
||||||
@@ -238,8 +241,8 @@ worker_thread (void *thread_data_vp)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (thread_data->verbose)
|
|
||||||
- printf ("thread %zu exiting (r = %d)\n",
|
|
||||||
- thread_data->thread_num, thread_data->r);
|
|
||||||
+ fprintf (stderr, "parallel: thread %zu exiting (r = %d)\n",
|
|
||||||
+ thread_data->thread_num, thread_data->r);
|
|
||||||
|
|
||||||
return &thread_data->r;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -12,15 +12,13 @@ Summary: Access and modify virtual machine disk images
|
|||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.23.23
|
Version: 1.23.23
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
|
||||||
# Source and patches.
|
# Source and patches.
|
||||||
URL: http://libguestfs.org/
|
URL: http://libguestfs.org/
|
||||||
Source0: http://libguestfs.org/download/1.23-development/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/1.23-development/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch1: 0001-virt-df-parallel-Send-debugging-messages-to-stderr.patch
|
|
||||||
|
|
||||||
# Basic build requirements:
|
# Basic build requirements:
|
||||||
BuildRequires: perl(Pod::Simple)
|
BuildRequires: perl(Pod::Simple)
|
||||||
BuildRequires: perl(Pod::Man)
|
BuildRequires: perl(Pod::Man)
|
||||||
@ -564,8 +562,6 @@ for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
|
if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
|
||||||
# For sVirt to work, the local temporary directory we use in the
|
# For sVirt to work, the local temporary directory we use in the
|
||||||
# tests must be labelled the same way as /tmp.
|
# tests must be labelled the same way as /tmp.
|
||||||
@ -957,8 +953,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 30 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.23-1
|
* Mon Sep 30 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.23-2
|
||||||
- New upstream version 1.23.23.
|
- New upstream version 1.23.23.
|
||||||
|
- Remove patch which is now upstream.
|
||||||
|
|
||||||
* Thu Sep 12 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.22-2
|
* Thu Sep 12 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.23.22-2
|
||||||
- Add patch to debug parallel tests.
|
- Add patch to debug parallel tests.
|
||||||
|
Loading…
Reference in New Issue
Block a user