[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 637bc5: qemu-nbd: Add --pid-file option
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 637bc5: qemu-nbd: Add --pid-file option |
Date: |
Thu, 13 Jun 2019 10:56:31 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 637bc5a5d8b7612bbbccd998d4183d2affb189e6
https://github.com/qemu/qemu/commit/637bc5a5d8b7612bbbccd998d4183d2affb189e6
Author: Max Reitz <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M qemu-nbd.c
M qemu-nbd.texi
Log Message:
-----------
qemu-nbd: Add --pid-file option
--fork is a bit boring if there is no way to get the child's PID. This
option helps.
Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 6177b58431cd19fddfd025225403876b8deeeec7
https://github.com/qemu/qemu/commit/6177b58431cd19fddfd025225403876b8deeeec7
Author: Max Reitz <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M tests/qemu-iotests/147
M tests/qemu-iotests/iotests.py
Log Message:
-----------
iotests.py: Add qemu_nbd_early_pipe()
qemu_nbd_pipe() currently unconditionally reads qemu-nbd's output. That
is not ideal because qemu-nbd may keep stderr open after the parent
process has exited.
Currently, the only user of qemu_nbd_pipe() is 147, which discards the
whole output if the parent process returned success and only evaluates
it on error. Therefore, we can replace qemu_nbd_pipe() by
qemu_nbd_early_pipe() that does the same: Discard the output on success,
and return it on error.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: e6df58a5578fee7a50bbf36f4a50a2781cff855d
https://github.com/qemu/qemu/commit/e6df58a5578fee7a50bbf36f4a50a2781cff855d
Author: Max Reitz <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M qemu-nbd.c
Log Message:
-----------
qemu-nbd: Do not close stderr
We kept old_stderr specifically so we could keep emitting error message
on stderr. However, qemu_daemon() closes stderr. Therefore, we need to
dup() stderr to old_stderr before invoking qemu_daemon().
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 4718360a58cb0a02a68d3b0e52a4711d7c398357
https://github.com/qemu/qemu/commit/4718360a58cb0a02a68d3b0e52a4711d7c398357
Author: Max Reitz <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M tests/qemu-iotests/common.rc
Log Message:
-----------
iotests: Use qemu-nbd's --pid-file
Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: b28f582c2acaca26b66262d75cc5a0bd2764482c
https://github.com/qemu/qemu/commit/b28f582c2acaca26b66262d75cc5a0bd2764482c
Author: Max Reitz <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M tests/qemu-iotests/233
M tests/qemu-iotests/common.nbd
Log Message:
-----------
iotests: Let 233 run concurrently
common.nbd's nbd_server_set_tcp_port() tries to find a free port, and
then uses it for the whole test run. However, this is racy because even
if the port was free at the beginning, there is no guarantee it will
continue to be available. Therefore, 233 currently cannot reliably be
run concurrently with other NBD TCP tests.
This patch addresses the problem by dropping nbd_server_set_tcp_port(),
and instead finding a new port every time nbd_server_start_tcp_socket()
is invoked. For this, we run qemu-nbd with --fork and on error evaluate
the output to see whether it contains "Address already in use". If so,
we try the next port.
On success, we still want to continually redirect the output from
qemu-nbd to stderr. To achieve both, we redirect qemu-nbd's stderr to a
FIFO that we then open in bash. If the parent process exits with status
0 (which means that the server has started successfully), we launch a
background cat process that copies the FIFO to stderr. On failure, we
read the whole content into a variable and then evaluate it.
While at it, use --fork in nbd_server_start_unix_socket(), too. Doing
so allows us to drop nbd_server_wait_for_*_socket().
Note that the reason common.nbd did not use --fork before is that
qemu-nbd did not have --pid-file.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 416e34bd04bea32a6e68c103dbbb4210a1f1d0dd
https://github.com/qemu/qemu/commit/416e34bd04bea32a6e68c103dbbb4210a1f1d0dd
Author: Eric Blake <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M nbd/server.c
Log Message:
-----------
nbd/server: Nicer spelling of max BLOCK_STATUS reply length
Commit 3d068aff (3.0) introduced NBD_MAX_BITMAP_EXTENTS as a limit on
how large we would allow a reply to NBD_CMD_BLOCK_STATUS to grow when
it is visiting a qemu:dirty-bitmap: context. Later, commit fb7afc79
(3.1) reused the constant to limit base:allocation context replies,
although the name is now less appropriate in that situation.
Rename things, and improve the macro to use units.h for better
legibility. Then reformat the comment to comply with checkpatch rules
added in the meantime. No semantic change.
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Commit: 0a93b359db270788b81c1dba6ce868877381fa94
https://github.com/qemu/qemu/commit/0a93b359db270788b81c1dba6ce868877381fa94
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M block/nbd-client.c
M block/nbd-client.h
M block/trace-events
Log Message:
-----------
block/nbd-client: drop stale logout
Drop one on failure path (we have errp) and turn two others into trace
points.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 86f8cdf3db8bc263ae08885e04ce96c089d1cac8
https://github.com/qemu/qemu/commit/86f8cdf3db8bc263ae08885e04ce96c089d1cac8
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M block/Makefile.objs
R block/nbd-client.c
R block/nbd-client.h
M block/nbd.c
M block/trace-events
Log Message:
-----------
block/nbd: merge nbd-client.* to nbd.c
No reason for keeping driver handlers realization separate from driver
structure. We can get rid of extra header file.
While being here, fix comments style, restore forgotten comments for
NBD_FOREACH_REPLY_CHUNK and nbd_reply_chunk_iter_receive, remove extra
includes.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: 611ae1d71647c58b23dc2c116a946884ce30abf8
https://github.com/qemu/qemu/commit/611ae1d71647c58b23dc2c116a946884ce30abf8
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M block/nbd.c
Log Message:
-----------
block/nbd: merge NBDClientSession struct back to BDRVNBDState
No reason to keep it separate, it differs from others block driver
behavior and therefore confuses. Instead of generic
'state = (State*)bs->opaque' we have to use special helper.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Commit: d1bf88e56f46c75d472dc60c02bbbc7b474519f9
https://github.com/qemu/qemu/commit/d1bf88e56f46c75d472dc60c02bbbc7b474519f9
Author: Peter Maydell <address@hidden>
Date: 2019-06-13 (Thu, 13 Jun 2019)
Changed paths:
M block/Makefile.objs
R block/nbd-client.c
R block/nbd-client.h
M block/nbd.c
M block/trace-events
M nbd/server.c
M qemu-nbd.c
M qemu-nbd.texi
M tests/qemu-iotests/147
M tests/qemu-iotests/233
M tests/qemu-iotests/common.nbd
M tests/qemu-iotests/common.rc
M tests/qemu-iotests/iotests.py
Log Message:
-----------
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-06-13' into
staging
nbd patches for 2019-06-13
- add 'qemu-nbd --pid-file'
- NBD-related iotest improvements
- NBD code refactoring in preparation for reconnect
# gpg: Signature made Thu 13 Jun 2019 16:37:58 BST
# gpg: using RSA key A7A16B4A2527436A
# gpg: Good signature from "Eric Blake <address@hidden>" [full]
# gpg: aka "Eric Blake (Free Software Programmer)
<address@hidden>" [full]
# gpg: aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2019-06-13:
block/nbd: merge NBDClientSession struct back to BDRVNBDState
block/nbd: merge nbd-client.* to nbd.c
block/nbd-client: drop stale logout
nbd/server: Nicer spelling of max BLOCK_STATUS reply length
iotests: Let 233 run concurrently
iotests: Use qemu-nbd's --pid-file
qemu-nbd: Do not close stderr
iotests.py: Add qemu_nbd_early_pipe()
qemu-nbd: Add --pid-file option
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/650a379d505b...d1bf88e56f46
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 637bc5: qemu-nbd: Add --pid-file option,
Peter Maydell <=