[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 582d42: qemu-nbd: Use SOMAXCONN for socket li
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 582d42: qemu-nbd: Use SOMAXCONN for socket listen() backlog |
Date: |
Fri, 12 Feb 2021 14:28:26 -0800 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 582d4210eb2f2ab5baac328fe4b479cd86da1647
https://github.com/qemu/qemu/commit/582d4210eb2f2ab5baac328fe4b479cd86da1647
Author: Eric Blake <eblake@redhat.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M blockdev-nbd.c
M qemu-nbd.c
Log Message:
-----------
qemu-nbd: Use SOMAXCONN for socket listen() backlog
Our default of a backlog of 1 connection is rather puny; it gets in
the way when we are explicitly allowing multiple clients (such as
qemu-nbd -e N [--shared], or nbd-server-start with its default
"max-connections":0 for unlimited), but is even a problem when we
stick to qemu-nbd's default of only 1 active client but use -t
[--persistent] where a second client can start using the server once
the first finishes. While the effects are less noticeable on TCP
sockets (since the client can poll() to learn when the server is ready
again), it is definitely observable on Unix sockets, where on Linux, a
client will fail with EAGAIN and no recourse but to sleep an arbitrary
amount of time before retrying if the server backlog is already full.
Since QMP nbd-server-start is always persistent, it now always
requests a backlog of SOMAXCONN; meanwhile, qemu-nbd will request
SOMAXCONN if persistent, otherwise its backlog should be based on the
expected number of clients.
See https://bugzilla.redhat.com/1925045 for a demonstration of where
our low backlog prevents libnbd from connecting as many parallel
clients as it wants.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
CC: qemu-stable@nongnu.org
Message-Id: <20210209152759.209074-2-eblake@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 3dcf56e625c684178c0062d845f9fe05ecce346f
https://github.com/qemu/qemu/commit/3dcf56e625c684178c0062d845f9fe05ecce346f
Author: Eric Blake <eblake@redhat.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M docs/tools/qemu-nbd.rst
M qemu-nbd.c
Log Message:
-----------
qemu-nbd: Permit --shared=0 for unlimited clients
This gives us better feature parity with QMP nbd-server-start, where
max-connections defaults to 0 for unlimited.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210209152759.209074-3-eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Commit: e055a5c8dc53212ede81f2dd828c688ee4f7c00b
https://github.com/qemu/qemu/commit/e055a5c8dc53212ede81f2dd828c688ee4f7c00b
Author: Max Reitz <mreitz@redhat.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M tests/qemu-iotests/210.out
Log Message:
-----------
iotests/210: Fix reference output
Commit 69b55e03f has changed an error message, adjust the reference
output to account for it.
Fixes: 69b55e03f7e65a36eb954d0b7d4698b258df2708
("block: refactor bdrv_check_request: add errp")
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210209181923.497688-1-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: c90e3512a4683345a8e7074961d8275ceaec578d
https://github.com/qemu/qemu/commit/c90e3512a4683345a8e7074961d8275ceaec578d
Author: Jagannathan Raman <jag.raman@oracle.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M io/channel.c
Log Message:
-----------
io: error_prepend() in qio_channel_readv_full_all() causes segfault
Using error_prepend() in qio_channel_readv_full_all() causes a segfault
as errp is not set when ret is 0. This results in the failure of iotest
83. Replacing with error_setg() fixes the problem.
Additionally, removes a full stop at the end of error message
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Fixes: bebab91ebdfc591f8793a9a17370df1bfbe8b2ca
(io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers)
Message-Id:
<be476bcdb99e820fec0fa09fe8f04c9dd3e62473.1613128220.git.jag.raman@oracle.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: bd54669a4adf0931be3b0574d07ce4809bf67807
https://github.com/qemu/qemu/commit/bd54669a4adf0931be3b0574d07ce4809bf67807
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/io.c
M include/block/block.h
M include/block/block_int.h
Log Message:
-----------
block: add new BlockDriver handler: bdrv_cancel_in_flight
It will be used to stop retrying NBD requests on mirror cancel.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: c4f7f24e1f6e81804a7f15356614d9249280ab02
https://github.com/qemu/qemu/commit/c4f7f24e1f6e81804a7f15356614d9249280ab02
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/nbd.c
Log Message:
-----------
block/nbd: implement .bdrv_cancel_in_flight
Just stop waiting for connection in existing requests.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-3-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 3fc1ec3725a92268cb896e7fd82b4b4b4718203b
https://github.com/qemu/qemu/commit/3fc1ec3725a92268cb896e7fd82b4b4b4718203b
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/raw-format.c
Log Message:
-----------
block/raw-format: implement .bdrv_cancel_in_flight handler
We are going to cancel in-flight requests on mirror nbd target on job
cancel. Still nbd is often used not directly but as raw-format child.
So, add pass-through handler here.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-4-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 9820933b57b24c21a509680650f669123651b60d
https://github.com/qemu/qemu/commit/9820933b57b24c21a509680650f669123651b60d
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M include/qemu/job.h
M job.c
Log Message:
-----------
job: add .cancel handler for the driver
To be used in mirror in the following commit to cancel in-flight io on
target to not waste the time.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210205163720.887197-5-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 521ff8b779b11c394dbdc43f02e158dd99df308a
https://github.com/qemu/qemu/commit/521ff8b779b11c394dbdc43f02e158dd99df308a
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/mirror.c
Log Message:
-----------
block/mirror: implement .cancel job handler
Cancel in-flight io on target to not waste the time.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-6-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 46bd6f8c364170d58f9b17a42fa9289872509f6b
https://github.com/qemu/qemu/commit/46bd6f8c364170d58f9b17a42fa9289872509f6b
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M tests/qemu-iotests/264
M tests/qemu-iotests/264.out
Log Message:
-----------
iotests/264: move to python unittest
We are going to add more test cases, so use the library supporting test
cases.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-7-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 3f7db418d10ee7b48c2ef718f6b66bc3e28282a6
https://github.com/qemu/qemu/commit/3f7db418d10ee7b48c2ef718f6b66bc3e28282a6
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M tests/qemu-iotests/iotests.py
Log Message:
-----------
iotests.py: qemu_nbd_popen: remove pid file after use
To not interfere with other qemu_nbd_popen() calls in same test.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-8-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: d00dd63135f7e18ddca2642d1933da1507f3f1cd
https://github.com/qemu/qemu/commit/d00dd63135f7e18ddca2642d1933da1507f3f1cd
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M tests/qemu-iotests/264
M tests/qemu-iotests/264.out
Log Message:
-----------
iotests/264: add mirror-cancel test-case
Check that cancel doesn't wait for 10s of nbd reconnect timeout.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-9-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: ff789bf5a93cede32a01e648dc010032791c84e1
https://github.com/qemu/qemu/commit/ff789bf5a93cede32a01e648dc010032791c84e1
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/backup.c
Log Message:
-----------
block/backup: implement .cancel job handler
Cancel in-flight io on target to not waste the time.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-10-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: 594427fc56758cb944a85914eefe722cc2c667b8
https://github.com/qemu/qemu/commit/594427fc56758cb944a85914eefe722cc2c667b8
Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M tests/qemu-iotests/264
M tests/qemu-iotests/264.out
Log Message:
-----------
iotests/264: add backup-cancel test-case
Check that cancel doesn't wait for 10s of nbd reconnect timeout.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210205163720.887197-11-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Commit: abb8b29aff352f226bf91cb59e5ac7e3e6082ce8
https://github.com/qemu/qemu/commit/abb8b29aff352f226bf91cb59e5ac7e3e6082ce8
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M block/backup.c
M block/io.c
M block/mirror.c
M block/nbd.c
M block/raw-format.c
M blockdev-nbd.c
M docs/tools/qemu-nbd.rst
M include/block/block.h
M include/block/block_int.h
M include/qemu/job.h
M io/channel.c
M job.c
M qemu-nbd.c
M tests/qemu-iotests/210.out
M tests/qemu-iotests/264
M tests/qemu-iotests/264.out
M tests/qemu-iotests/iotests.py
Log Message:
-----------
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-02-12' into
staging
nbd patches for 2021-02-12
- let qemu-nbd handle larger backlog of connecting clients
- fix a few NBD-related iotest failures
- add block cancellation hook for faster response to NBD failures
# gpg: Signature made Fri 12 Feb 2021 19:57:56 GMT
# gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg: aka "Eric Blake (Free Software Programmer)
<ebb9@byu.net>" [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-2021-02-12:
iotests/264: add backup-cancel test-case
block/backup: implement .cancel job handler
iotests/264: add mirror-cancel test-case
iotests.py: qemu_nbd_popen: remove pid file after use
iotests/264: move to python unittest
block/mirror: implement .cancel job handler
job: add .cancel handler for the driver
block/raw-format: implement .bdrv_cancel_in_flight handler
block/nbd: implement .bdrv_cancel_in_flight
block: add new BlockDriver handler: bdrv_cancel_in_flight
io: error_prepend() in qio_channel_readv_full_all() causes segfault
iotests/210: Fix reference output
qemu-nbd: Permit --shared=0 for unlimited clients
qemu-nbd: Use SOMAXCONN for socket listen() backlog
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/eac92d316351...abb8b29aff35
- [Qemu-commits] [qemu/qemu] 582d42: qemu-nbd: Use SOMAXCONN for socket listen() backlog,
Peter Maydell <=