qemu-e2k/tests/qemu-iotests/tests
Eric Blake 58a6fdcc9e nbd/server: Allow MULTI_CONN for shared writable exports
According to the NBD spec, a server that advertises
NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will
not see any cache inconsistencies: when properly separated by a single
flush, actions performed by one client will be visible to another
client, regardless of which client did the flush.

We always satisfy these conditions in qemu - even when we support
multiple clients, ALL clients go through a single point of reference
into the block layer, with no local caching.  The effect of one client
is instantly visible to the next client.  Even if our backend were a
network device, we argue that any multi-path caching effects that
would cause inconsistencies in back-to-back actions not seeing the
effect of previous actions would be a bug in that backend, and not the
fault of caching in qemu.  As such, it is safe to unconditionally
advertise CAN_MULTI_CONN for any qemu NBD server situation that
supports parallel clients.

Note, however, that we don't want to advertise CAN_MULTI_CONN when we
know that a second client cannot connect (for historical reasons,
qemu-nbd defaults to a single connection while nbd-server-add and QMP
commands default to unlimited connections; but we already have
existing means to let either style of NBD server creation alter those
defaults).  This is visible by no longer advertising MULTI_CONN for
'qemu-nbd -r' without -e, as in the iotest nbd-qemu-allocation.

The harder part of this patch is setting up an iotest to demonstrate
behavior of multiple NBD clients to a single server.  It might be
possible with parallel qemu-io processes, but I found it easier to do
in python with the help of libnbd, and help from Nir and Vladimir in
writing the test.

Signed-off-by: Eric Blake <eblake@redhat.com>
Suggested-by: Nir Soffer <nsoffer@redhat.com>
Suggested-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
Message-Id: <20220512004924.417153-3-eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-05-12 13:10:52 +02:00
..
block-status-cache iotests: add qemu_img_map() function 2022-03-22 10:14:34 +01:00
block-status-cache.out iotests/block-status-cache: New test 2022-01-28 16:55:23 -06:00
export-incoming-iothread iotests: Add regression test for issue 945 2022-05-04 15:55:23 +02:00
export-incoming-iothread.out iotests: Add regression test for issue 945 2022-05-04 15:55:23 +02:00
fuse-allow-other iotests/fuse-allow-other: Test allow-other 2021-07-09 12:26:05 +02:00
fuse-allow-other.out iotests/fuse-allow-other: Test allow-other 2021-07-09 12:26:05 +02:00
graph-changes-while-io iotests: Remove explicit checks for qemu_img() == 0 2022-03-22 10:14:25 +01:00
graph-changes-while-io.out iotests/graph-changes-while-io: New test 2022-03-04 18:18:26 +01:00
image-fleecing iotests: remove qemu_io_silent() and qemu_io_silent_check(). 2022-04-25 14:30:34 +02:00
image-fleecing.out iotests/image-fleecing: test push backup with fleecing 2022-03-07 09:33:31 +01:00
migrate-bitmaps-postcopy-test iotests: specify some unsupported_imgopts for python iotests 2022-02-01 10:51:39 +01:00
migrate-bitmaps-postcopy-test.out
migrate-bitmaps-test iotests: specify some unsupported_imgopts for python iotests 2022-02-01 10:51:39 +01:00
migrate-bitmaps-test.out
migrate-during-backup block: bdrv_inactivate_recurse(): check for permissions and fix crash 2021-09-15 15:54:07 +02:00
migrate-during-backup.out tests: add migrate-during-backup 2021-09-15 15:54:07 +02:00
migration-permissions iotests/migration-permissions: use assertRaises() for qemu_io() negative test 2022-04-25 14:30:29 +02:00
migration-permissions.out iotests/migration-permissions: New test 2022-02-01 10:51:39 +01:00
mirror-ready-cancel-error iotests: remove qemu_io_silent() and qemu_io_silent_check(). 2022-04-25 14:30:34 +02:00
mirror-ready-cancel-error.out iotests: Add mirror-ready-cancel-error test 2021-10-07 10:42:50 +02:00
mirror-top-perms python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
mirror-top-perms.out iotests: Test mirror-top filter permissions 2021-04-09 18:00:29 +02:00
nbd-multiconn nbd/server: Allow MULTI_CONN for shared writable exports 2022-05-12 13:10:52 +02:00
nbd-multiconn.out nbd/server: Allow MULTI_CONN for shared writable exports 2022-05-12 13:10:52 +02:00
nbd-qemu-allocation iotests: Improve and rename test 309 to nbd-qemu-allocation 2021-07-12 10:56:41 -05:00
nbd-qemu-allocation.out nbd/server: Allow MULTI_CONN for shared writable exports 2022-05-12 13:10:52 +02:00
nbd-reconnect-on-open iotests: make qemu_io_log() check return codes by default 2022-04-25 14:30:35 +02:00
nbd-reconnect-on-open.out iotests: add nbd-reconnect-on-open test 2021-12-23 09:40:34 +01:00
parallels-read-bitmap iotests: add qemu_img_map() function 2022-03-22 10:14:34 +01:00
parallels-read-bitmap.out iotests: add parallels-read-bitmap test 2021-03-08 14:56:55 +01:00
qemu-img-bitmaps qemu-img: Add --skip-broken-bitmaps for 'convert --bitmaps' 2021-07-21 14:14:41 -05:00
qemu-img-bitmaps.out qemu-img: Add --skip-broken-bitmaps for 'convert --bitmaps' 2021-07-21 14:14:41 -05:00
qsd-jobs iotests/qsd-jobs: Filter events in the first test 2021-04-09 18:00:29 +02:00
qsd-jobs.out job: @force parameter for job_cancel_sync() 2021-10-07 10:42:09 +02:00
remove-bitmap-from-backing iotests/remove-bitmap-from-backing: use qemu_img_info() 2022-03-22 10:14:32 +01:00
remove-bitmap-from-backing.out iotests: add test for removing persistent bitmap from backing file 2021-04-09 18:00:29 +02:00
reopen-file iotests/reopen-file: Test reopening file child 2022-05-04 15:55:23 +02:00
reopen-file.out iotests/reopen-file: Test reopening file child 2022-05-04 15:55:23 +02:00
stream-error-on-reset iotests: remove qemu_io_silent() and qemu_io_silent_check(). 2022-04-25 14:30:34 +02:00
stream-error-on-reset.out iotests/stream-error-on-reset: New test 2022-01-14 12:03:16 +01:00