1
The following changes since commit fb68096da3d35e64c88cd610c1fa42766c58e92a:
1
The following changes since commit c416eecea5f3aea863ab8fda5a36a24157b8f704:
2
2
3
Revert "tests: use memfd in vhost-user-test" (2018-02-13 09:51:52 +0000)
3
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-05-15 17:02:00 +0100)
4
4
5
are available in the Git repository at:
5
are available in the git repository at:
6
6
7
git://github.com/stefanha/qemu.git tags/block-pull-request
7
git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
8
8
9
for you to fetch changes up to 64b01feca991e5b19a5d750ef77cdca92b68bdbb:
9
for you to fetch changes up to c82be42cc803b36fd7aed5dceec68312c7056fd5:
10
10
11
misc: fix spelling (2018-02-13 15:38:17 +0000)
11
nfs: Remove processed options from QDict (2018-05-16 13:37:47 -0400)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
14
Block patches
15
----------------------------------------------------------------
15
----------------------------------------------------------------
16
16
17
Fam Zheng (2):
17
Kevin Wolf (2):
18
Add a git-publish configuration file
18
nfs: Fix error path in nfs_options_qdict_to_qapi()
19
README: Document 'git-publish' workflow
19
nfs: Remove processed options from QDict
20
20
21
Marc-André Lureau (1):
21
Stefan Hajnoczi (2):
22
misc: fix spelling
22
qemu-iotests: reduce chance of races in 185
23
blockjob: do not cancel timer in resume
23
24
24
Stefan Hajnoczi (1):
25
block/nfs.c | 8 ++++++++
25
vl: pause vcpus before stopping iothreads
26
blockjob.c | 22 +++++++++++++++-------
26
27
tests/qemu-iotests/185 | 17 +++++++++++++----
27
Wolfgang Bumiller (1):
28
tests/qemu-iotests/185.out | 12 +++++-------
28
ratelimit: don't align wait time with slices
29
4 files changed, 41 insertions(+), 18 deletions(-)
29
30
include/qemu/ratelimit.h | 11 ++++-----
31
util/qemu-coroutine-lock.c | 2 +-
32
vl.c | 12 ++++++++--
33
.gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++
34
README | 31 ++++++++++++++++++++++++-
35
5 files changed, 104 insertions(+), 10 deletions(-)
36
create mode 100644 .gitpublish
37
30
38
--
31
--
39
2.14.3
32
2.13.6
40
33
41
34
diff view generated by jsdifflib
Deleted patch
1
From: Fam Zheng <famz@redhat.com>
2
1
3
git-publish [1] is a convenient tool to send patches and has been
4
popular among QEMU developers. Recently it has been made available in
5
Fedora official repo thanks to Stefan's work.
6
7
One nice feature of the tool is a per-project configuration with
8
profiles, especially in which the cccmd option is a handy method to
9
create the Cc list.
10
11
[1]: https://github.com/stefanha/git-publish
12
13
Signed-off-by: Fam Zheng <famz@redhat.com>
14
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
15
Message-id: 20180205054725.25634-2-famz@redhat.com
16
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
17
---
18
.gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19
1 file changed, 58 insertions(+)
20
create mode 100644 .gitpublish
21
22
diff --git a/.gitpublish b/.gitpublish
23
new file mode 100644
24
index XXXXXXX..XXXXXXX
25
--- /dev/null
26
+++ b/.gitpublish
27
@@ -XXX,XX +XXX,XX @@
28
+#
29
+# Common git-publish profiles that can be used to send patches to QEMU upstream.
30
+#
31
+# See https://github.com/stefanha/git-publish for more information
32
+#
33
+[gitpublishprofile "default"]
34
+base = master
35
+prefix = PATCH
36
+to = qemu-devel@nongnu.org
37
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
38
+
39
+[gitpublishprofile "rfc"]
40
+base = master
41
+prefix = RFC PATCH
42
+to = qemu-devel@nongnu.org
43
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
44
+
45
+[gitpublishprofile "stable"]
46
+base = master
47
+prefix = PATCH
48
+to = qemu-devel@nongnu.org
49
+cc = qemu-stable@nongnu.org
50
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
51
+
52
+[gitpublishprofile "trivial"]
53
+base = master
54
+prefix = PATCH
55
+to = qemu-devel@nongnu.org
56
+cc = qemu-trivial@nongnu.org
57
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
58
+
59
+[gitpublishprofile "block"]
60
+base = master
61
+prefix = PATCH
62
+to = qemu-devel@nongnu.org
63
+cc = qemu-block@nongnu.org
64
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
65
+
66
+[gitpublishprofile "arm"]
67
+base = master
68
+prefix = PATCH
69
+to = qemu-devel@nongnu.org
70
+cc = qemu-arm@nongnu.org
71
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
72
+
73
+[gitpublishprofile "s390"]
74
+base = master
75
+prefix = PATCH
76
+to = qemu-devel@nongnu.org
77
+cc = qemu-s390@nongnu.org
78
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
79
+
80
+[gitpublishprofile "ppc"]
81
+base = master
82
+prefix = PATCH
83
+to = qemu-devel@nongnu.org
84
+cc = qemu-ppc@nongnu.org
85
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
86
--
87
2.14.3
88
89
diff view generated by jsdifflib
1
From: Marc-André Lureau <marcandre.lureau@redhat.com>
1
From: Stefan Hajnoczi <stefanha@redhat.com>
2
2
3
s/pupulate/populate
3
Commit 8565c3ab537e78f3e69977ec2c609dc9417a806e ("qemu-iotests: fix
4
185") identified a race condition in a sub-test.
4
5
5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
6
Similar issues also affect the other sub-tests. If disk I/O completes
6
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
7
quickly, it races with the QMP 'quit' command. This causes spurious
7
Message-id: 20180208162447.10851-1-marcandre.lureau@redhat.com
8
test failures because QMP events are emitted in an unpredictable order.
9
10
This test relies on QEMU internals and there is no QMP API for getting
11
deterministic behavior needed to make this test 100% reliable. At the
12
same time, the test is useful and it would be a shame to remove it.
13
14
Add sleep 0.5 to reduce the chance of races. This is not a real fix but
15
appears to reduce spurious failures in practice.
16
17
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
18
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
19
Reviewed-by: Eric Blake <eblake@redhat.com>
20
Message-id: 20180508135436.30140-2-stefanha@redhat.com
21
Reviewed-by: Jeff Cody <jcody@redhat.com>
22
Signed-off-by: Jeff Cody <jcody@redhat.com>
9
---
23
---
10
util/qemu-coroutine-lock.c | 2 +-
24
tests/qemu-iotests/185 | 12 ++++++++++++
11
1 file changed, 1 insertion(+), 1 deletion(-)
25
1 file changed, 12 insertions(+)
12
26
13
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
27
diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185
14
index XXXXXXX..XXXXXXX 100644
28
index XXXXXXX..XXXXXXX 100755
15
--- a/util/qemu-coroutine-lock.c
29
--- a/tests/qemu-iotests/185
16
+++ b/util/qemu-coroutine-lock.c
30
+++ b/tests/qemu-iotests/185
17
@@ -XXX,XX +XXX,XX @@ void qemu_co_queue_run_restart(Coroutine *co)
31
@@ -XXX,XX +XXX,XX @@ _send_qemu_cmd $h \
18
* invalid memory. Therefore, use a temporary queue and do not touch
32
'speed': 65536 } }" \
19
* the "co" coroutine as soon as you enter another one.
33
"return"
20
*
34
21
- * In its turn resumed "co" can pupulate "co_queue_wakeup" queue with
35
+# If we don't sleep here 'quit' command races with disk I/O
22
+ * In its turn resumed "co" can populate "co_queue_wakeup" queue with
36
+sleep 0.5
23
* new coroutines to be woken up. The caller, who has resumed "co",
37
+
24
* will be responsible for traversing the same queue, which may cause
38
_send_qemu_cmd $h "{ 'execute': 'quit' }" "return"
25
* a different wakeup order but not any missing wakeups.
39
wait=1 _cleanup_qemu
40
41
@@ -XXX,XX +XXX,XX @@ _send_qemu_cmd $h \
42
'speed': 65536 } }" \
43
"return"
44
45
+# If we don't sleep here 'quit' command races with disk I/O
46
+sleep 0.5
47
+
48
_send_qemu_cmd $h "{ 'execute': 'quit' }" "return"
49
wait=1 _cleanup_qemu
50
51
@@ -XXX,XX +XXX,XX @@ _send_qemu_cmd $h \
52
'speed': 65536 } }" \
53
"return"
54
55
+# If we don't sleep here 'quit' command races with disk I/O
56
+sleep 0.5
57
+
58
_send_qemu_cmd $h "{ 'execute': 'quit' }" "return"
59
wait=1 _cleanup_qemu
60
61
@@ -XXX,XX +XXX,XX @@ _send_qemu_cmd $h \
62
'speed': 65536 } }" \
63
"return"
64
65
+# If we don't sleep here 'quit' command races with disk I/O
66
+sleep 0.5
67
+
68
_send_qemu_cmd $h "{ 'execute': 'quit' }" "return"
69
wait=1 _cleanup_qemu
70
26
--
71
--
27
2.14.3
72
2.13.6
28
73
29
74
diff view generated by jsdifflib
1
Commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads
1
From: Stefan Hajnoczi <stefanha@redhat.com>
2
before main() quits") introduced iothread_stop_all() to avoid the
3
following virtio-scsi assertion failure:
4
2
5
assert(blk_get_aio_context(d->conf.blk) == s->ctx);
3
Currently the timer is cancelled and the block job is entered by
4
block_job_resume(). This behavior causes drain to run extra blockjob
5
iterations when the job was sleeping due to the ratelimit.
6
6
7
Back then the assertion failed because when bdrv_close_all() made
7
This patch leaves the job asleep when block_job_resume() is called.
8
d->conf.blk NULL, blk_get_aio_context() returned the global AioContext
8
Jobs can still be forcibly woken up using block_job_enter(), which is
9
instead of s->ctx.
9
used to cancel jobs.
10
10
11
The same assertion can still fail today when vcpus submit new I/O
11
After this patch drain no longer runs extra blockjob iterations. This
12
requests after iothread_stop_all() has moved the BDS to the global
12
is the expected behavior that qemu-iotests 185 used to rely on. We
13
AioContext.
13
temporarily changed the 185 test output to make it pass for the QEMU
14
2.12 release but now it's time to address this issue.
14
15
15
This patch hardens the iothread_stop_all() approach by pausing vcpus
16
Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
16
before calling iothread_stop_all().
17
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
18
Reviewed-by: Eric Blake <eblake@redhat.com>
19
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
20
Message-id: 20180508135436.30140-3-stefanha@redhat.com
21
Reviewed-by: Jeff Cody <jcody@redhat.com>
22
Signed-off-by: Jeff Cody <jcody@redhat.com>
23
---
24
blockjob.c | 22 +++++++++++++++-------
25
tests/qemu-iotests/185 | 5 +----
26
tests/qemu-iotests/185.out | 12 +++++-------
27
3 files changed, 21 insertions(+), 18 deletions(-)
17
28
18
Note that the assertion failure is a race condition. It is not possible
29
diff --git a/blockjob.c b/blockjob.c
19
to reproduce it reliably.
20
21
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22
Message-id: 20180201110708.8080-1-stefanha@redhat.com
23
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
24
---
25
vl.c | 12 ++++++++++--
26
1 file changed, 10 insertions(+), 2 deletions(-)
27
28
diff --git a/vl.c b/vl.c
29
index XXXXXXX..XXXXXXX 100644
30
index XXXXXXX..XXXXXXX 100644
30
--- a/vl.c
31
--- a/blockjob.c
31
+++ b/vl.c
32
+++ b/blockjob.c
32
@@ -XXX,XX +XXX,XX @@ int main(int argc, char **argv, char **envp)
33
@@ -XXX,XX +XXX,XX @@ static void block_job_txn_del_job(BlockJob *job)
33
34
}
34
main_loop();
35
}
35
replay_disable_events();
36
37
+/* Assumes the block_job_mutex is held */
38
+static bool block_job_timer_pending(BlockJob *job)
39
+{
40
+ return timer_pending(&job->sleep_timer);
41
+}
36
+
42
+
37
+ /* The ordering of the following is delicate. Stop vcpus to prevent new
43
+/* Assumes the block_job_mutex is held */
38
+ * I/O requests being queued by the guest. Then stop IOThreads (this
44
+static bool block_job_timer_not_pending(BlockJob *job)
39
+ * includes a drain operation and completes all request processing). At
45
+{
40
+ * this point emulated devices are still associated with their IOThreads
46
+ return !block_job_timer_pending(job);
41
+ * (if any) but no longer have any work to do. Only then can we close
47
+}
42
+ * block devices safely because we know there is no more I/O coming.
48
+
43
+ */
49
static void block_job_pause(BlockJob *job)
44
+ pause_all_vcpus();
50
{
45
iothread_stop_all();
51
job->pause_count++;
52
@@ -XXX,XX +XXX,XX @@ static void block_job_resume(BlockJob *job)
53
if (job->pause_count) {
54
return;
55
}
56
- block_job_enter(job);
57
+
58
+ /* kick only if no timer is pending */
59
+ block_job_enter_cond(job, block_job_timer_not_pending);
60
}
61
62
void block_job_ref(BlockJob *job)
63
@@ -XXX,XX +XXX,XX @@ static void block_job_completed_txn_success(BlockJob *job)
64
}
65
}
66
67
-/* Assumes the block_job_mutex is held */
68
-static bool block_job_timer_pending(BlockJob *job)
69
-{
70
- return timer_pending(&job->sleep_timer);
71
-}
46
-
72
-
47
- pause_all_vcpus();
73
void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp)
48
bdrv_close_all();
74
{
49
+
75
int64_t old_speed = job->speed;
50
res_free();
76
diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185
51
77
index XXXXXXX..XXXXXXX 100755
52
/* vhost-user must be cleaned up before chardevs. */
78
--- a/tests/qemu-iotests/185
79
+++ b/tests/qemu-iotests/185
80
@@ -XXX,XX +XXX,XX @@ echo
81
# command to be received (after receiving the command, the rest runs
82
# synchronously, so jobs can arbitrarily continue or complete).
83
#
84
-# Jobs present while QEMU is terminating iterate once more due to
85
-# bdrv_drain_all().
86
-#
87
# The buffer size for commit and streaming is 512k (waiting for 8 seconds after
88
# the first request), for active commit and mirror it's large enough to cover
89
# the full 4M, and for backup it's the qcow2 cluster size, which we know is
90
# 64k. As all of these are at least as large as the speed, we are sure that the
91
-# offset advances exactly twice before qemu exits.
92
+# offset advances exactly once before qemu exits.
93
94
_send_qemu_cmd $h \
95
"{ 'execute': 'block-commit',
96
diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out
97
index XXXXXXX..XXXXXXX 100644
98
--- a/tests/qemu-iotests/185.out
99
+++ b/tests/qemu-iotests/185.out
100
@@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 backing_file=TEST_DIR/t.q
101
{"return": {}}
102
{"return": {}}
103
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
104
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 1048576, "speed": 65536, "type": "commit"}}
105
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "commit"}}
106
107
=== Start active commit job and exit qemu ===
108
109
@@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 backing_file=TEST_DIR/t.q
110
{"return": {}}
111
{"return": {}}
112
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
113
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "commit"}}
114
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "commit"}}
115
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "commit"}}
116
117
=== Start mirror job and exit qemu ===
118
119
@@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
120
{"return": {}}
121
{"return": {}}
122
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
123
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}}
124
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}}
125
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}}
126
127
=== Start backup job and exit qemu ===
128
129
@@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
130
{"return": {}}
131
{"return": {}}
132
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
133
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 131072, "speed": 65536, "type": "backup"}}
134
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 65536, "speed": 65536, "type": "backup"}}
135
136
=== Start streaming job and exit qemu ===
137
138
@@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=67108864 cluster_size=65536 l
139
{"return": {}}
140
{"return": {}}
141
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}
142
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 1048576, "speed": 65536, "type": "stream"}}
143
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "stream"}}
144
No errors were found on the image.
145
*** done
53
--
146
--
54
2.14.3
147
2.13.6
55
148
56
149
diff view generated by jsdifflib
1
From: Fam Zheng <famz@redhat.com>
1
From: Kevin Wolf <kwolf@redhat.com>
2
2
3
[Fixed s/git-profile/git-publish/ typo and s/for once/the first time/.
3
Don't throw away local_err, but propagate it to errp.
4
--Stefan]
5
4
6
Signed-off-by: Fam Zheng <famz@redhat.com>
5
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
6
Message-id: 20180516161034.27440-1-kwolf@redhat.com
8
Message-id: 20180205054725.25634-3-famz@redhat.com
7
Reviewed-by: Eric Blake <eblake@redhat.com>
9
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8
Reviewed-by: Jeff Cody <jcody@redhat.com>
9
Signed-off-by: Jeff Cody <jcody@redhat.com>
10
---
10
---
11
README | 31 ++++++++++++++++++++++++++++++-
11
block/nfs.c | 1 +
12
1 file changed, 30 insertions(+), 1 deletion(-)
12
1 file changed, 1 insertion(+)
13
13
14
diff --git a/README b/README
14
diff --git a/block/nfs.c b/block/nfs.c
15
index XXXXXXX..XXXXXXX 100644
15
index XXXXXXX..XXXXXXX 100644
16
--- a/README
16
--- a/block/nfs.c
17
+++ b/README
17
+++ b/block/nfs.c
18
@@ -XXX,XX +XXX,XX @@ The QEMU source code is maintained under the GIT version control system.
18
@@ -XXX,XX +XXX,XX @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
19
19
qobject_unref(crumpled);
20
git clone git://git.qemu.org/qemu.git
20
21
21
if (local_err) {
22
-When submitting patches, the preferred approach is to use 'git
22
+ error_propagate(errp, local_err);
23
+When submitting patches, one common approach is to use 'git
23
return NULL;
24
format-patch' and/or 'git send-email' to format & send the mail to the
24
}
25
qemu-devel@nongnu.org mailing list. All patches submitted must contain
26
a 'Signed-off-by' line from the author. Patches should follow the
27
guidelines set out in the HACKING and CODING_STYLE files.
28
29
+A 'git-publish' utility was created to make above process less
30
+cumbersome, and is highly recommended for making regular contributions,
31
+or even just for sending consecutive patch series revisions. It also
32
+requires a working 'git send-email' setup, and by default doesn't
33
+automate everything, so you may want to go through the above steps
34
+manually the first time.
35
+
36
+For installation instructions, please go to
37
+
38
+ https://github.com/stefanha/git-publish
39
+
40
+The workflow with 'git-publish' is:
41
+
42
+ $ git checkout master -b my-feature
43
+ $ # work on new commits, add your 'Signed-off-by' lines to each
44
+ $ git publish
45
+
46
+Your patch series will be sent and tagged as my-feature-v1 if you need to refer
47
+back to it in the future.
48
+
49
+Sending v2:
50
+
51
+ $ git checkout my-feature # same topic branch
52
+ $ # making changes to the commits (using 'git rebase', for example)
53
+ $ git publish
54
+
55
+Your patch series will be sent with 'v2' tag in the subject and the git tip
56
+will be tagged as my-feature-v2.
57
+
58
Additional information on submitting patches can be found online via
59
the QEMU website
60
25
61
--
26
--
62
2.14.3
27
2.13.6
63
28
64
29
diff view generated by jsdifflib
1
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
1
From: Kevin Wolf <kwolf@redhat.com>
2
2
3
It is possible for rate limited writes to keep overshooting a slice's
3
Commit c22a03454 QAPIfied option parsing in the NFS block driver, but
4
quota by a tiny amount causing the slice-aligned waiting period to
4
forgot to remove all the options we processed. Therefore, we get an
5
effectively halve the rate.
5
error in bdrv_open_inherit(), which thinks the remaining options are
6
invalid. Trying to open an NFS image will result in an error like this:
6
7
7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8
Block protocol 'nfs' doesn't support the option 'server.host'
8
Reviewed-by: Alberto Garcia <berto@igalia.com>
9
9
Message-id: 20180207071758.6818-1-w.bumiller@proxmox.com
10
Remove all options from the QDict to make the NFS driver work again.
10
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11
12
Cc: qemu-stable@nongnu.org
13
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
14
Message-id: 20180516160816.26259-1-kwolf@redhat.com
15
Reviewed-by: Eric Blake <eblake@redhat.com>
16
Reviewed-by: Jeff Cody <jcody@redhat.com>
17
Signed-off-by: Jeff Cody <jcody@redhat.com>
11
---
18
---
12
include/qemu/ratelimit.h | 11 +++++------
19
block/nfs.c | 7 +++++++
13
1 file changed, 5 insertions(+), 6 deletions(-)
20
1 file changed, 7 insertions(+)
14
21
15
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
22
diff --git a/block/nfs.c b/block/nfs.c
16
index XXXXXXX..XXXXXXX 100644
23
index XXXXXXX..XXXXXXX 100644
17
--- a/include/qemu/ratelimit.h
24
--- a/block/nfs.c
18
+++ b/include/qemu/ratelimit.h
25
+++ b/block/nfs.c
19
@@ -XXX,XX +XXX,XX @@ typedef struct {
26
@@ -XXX,XX +XXX,XX @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
20
static inline int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n)
27
BlockdevOptionsNfs *opts = NULL;
21
{
28
QObject *crumpled = NULL;
22
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
29
Visitor *v;
23
- uint64_t delay_slices;
30
+ const QDictEntry *e;
24
+ double delay_slices;
31
Error *local_err = NULL;
25
32
26
assert(limit->slice_quota && limit->slice_ns);
33
crumpled = qdict_crumple(options, errp);
27
34
@@ -XXX,XX +XXX,XX @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
28
@@ -XXX,XX +XXX,XX @@ static inline int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n)
35
return NULL;
29
return 0;
30
}
36
}
31
37
32
- /* Quota exceeded. Calculate the next time slice we may start
38
+ /* Remove the processed options from the QDict (the visitor processes
33
- * sending data again. */
39
+ * _all_ options in the QDict) */
34
- delay_slices = (limit->dispatched + limit->slice_quota - 1) /
40
+ while ((e = qdict_first(options))) {
35
- limit->slice_quota;
41
+ qdict_del(options, e->key);
36
+ /* Quota exceeded. Wait based on the excess amount and then start a new
42
+ }
37
+ * slice. */
43
+
38
+ delay_slices = (double)limit->dispatched / limit->slice_quota;
44
return opts;
39
limit->slice_end_time = limit->slice_start_time +
40
- delay_slices * limit->slice_ns;
41
+ (uint64_t)(delay_slices * limit->slice_ns);
42
return limit->slice_end_time - now;
43
}
45
}
44
46
45
--
47
--
46
2.14.3
48
2.13.6
47
49
48
50
diff view generated by jsdifflib