qemu-patch-raspberry4/block
John Snow 8b2e20f64f block/dirty-bitmap: change semantics of enabled predicate
Currently, the enabled predicate means something like:
"the QAPI status of the bitmap is ACTIVE."
After this patch, it should mean exclusively:
"This bitmap is recording guest writes, and is allowed to do so."

In many places, this is how this predicate was already used.
Internal usages of the bitmap QPI can call user_locked to find out if
the bitmap is in use by an operation.

To accommodate this, modify the create_successor routine to now
explicitly disable the parent bitmap at creation time.

Justifications:

1. bdrv_dirty_bitmap_status suffers no change from the lack of
   1:1 parity with the new predicates because of the order in which
   the predicates are checked. This is now only for compatibility.

2. bdrv_set_dirty() is unchanged: pre-patch, it was skipping bitmaps that were
   disabled or had a successor, while post-patch it is only skipping bitmaps
   that are disabled. To accommodate this, create_successor now ensures that
   any bitmap with a successor is explicitly disabled.

3. qcow2_store_persistent_dirty_bitmaps: No functional change. This function
   cares only about the literal enabled bit, and makes no effort to check if
   the bitmap is in-use or not. After this patch there are still no ways to
   produce an enabled bitmap with a successor.

4. block_dirty_bitmap_enable_prepare
   block_dirty_bitmap_disable_prepare
   init_dirty_bitmap_migration
   nbd_export_new

   These functions care about the literal enabled bit,
   and already check user_locked separately.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190223000614.13894-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2019-03-12 12:05:48 -04:00
..
accounting.c block/accounting: introduce latency histogram 2018-03-19 14:58:37 -05:00
backup.c block/backup: use qemu_iovec_init_buf 2019-02-22 09:42:13 +00:00
blkdebug.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
blklogwrites.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
blkreplay.c trivial: Make bios files and source files non-executable 2018-09-25 17:26:18 +02:00
blkverify.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
block-backend.c Block layer patches: 2019-02-26 19:04:47 +00:00
bochs.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
cloop.c block: Require auto-read-only for existing fallbacks 2018-11-05 15:09:55 +01:00
commit.c Block layer patches: 2019-02-26 19:04:47 +00:00
copy-on-read.c block: drop empty .bdrv_close handlers 2018-08-15 12:50:39 +02:00
create.c jobs: utilize job_exit shim 2018-08-31 16:28:33 +02:00
crypto.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
crypto.h block/crypto: Simplify block_crypto_{open,create}_opts_init() 2018-06-29 14:20:56 +02:00
curl.c block/curl: Implement bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
dirty-bitmap.c block/dirty-bitmap: change semantics of enabled predicate 2019-03-12 12:05:48 -04:00
dmg-bz2.c dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
dmg-lzfse.c block: adding lzfse decompressing support as a module. 2018-12-14 11:52:40 +01:00
dmg.c dmg: don't skip zero chunk 2019-01-04 11:15:09 +00:00
dmg.h dmg: including dmg-lzfse module inside dmg block driver. 2018-12-14 11:52:40 +01:00
file-posix.c block/file-posix: Convert from DPRINTF() macro to trace events 2019-01-31 00:38:19 +01:00
file-win32.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
gluster.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
io.c block/io: use qemu_iovec_init_buf 2019-02-22 09:42:13 +00:00
iscsi-opts.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
iscsi.c block/iscsi: Restrict Linux-specific code 2019-03-11 16:33:49 +01:00
linux-aio.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
Makefile.objs configure: adding support to lzfse library. 2018-12-14 11:52:40 +01:00
mirror.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
nbd-client.c nbd: Increase bs->in_flight during AioContext switch 2019-02-25 15:03:19 +01:00
nbd-client.h nbd: Restrict connection_co reentrance 2019-02-25 15:03:19 +01:00
nbd.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
nfs.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
null.c block/null: Generate filename even with latency-ns 2019-02-25 15:11:27 +01:00
nvme.c block/nvme: Fix bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
parallels.c block/parallels: use QEMU_IOVEC_INIT_BUF 2019-02-22 09:42:13 +00:00
parallels.h Clean up includes 2018-02-09 05:05:11 +01:00
qapi.c block: bdrv_get_full_backing_filename's ret. val. 2019-02-25 15:11:26 +01:00
qcow.c Block layer patches: 2019-02-26 19:04:47 +00:00
qcow2-bitmap.c qcow2: External file I/O 2019-03-08 12:26:46 +01:00
qcow2-cache.c qcow2: External file I/O 2019-03-08 12:26:46 +01:00
qcow2-cluster.c qcow2: Implement data-file-raw create option 2019-03-08 12:26:46 +01:00
qcow2-refcount.c qcow2: Support external data file in qemu-img check 2019-03-08 12:26:46 +01:00
qcow2-snapshot.c qcow2: Return error for snapshot operation with data file 2019-03-08 12:26:46 +01:00
qcow2.c qcow2: Implement data-file-raw create option 2019-03-08 12:26:46 +01:00
qcow2.h qcow2: Implement data-file-raw create option 2019-03-08 12:26:46 +01:00
qed-check.c block: convert bdrv_check callback to coroutine_fn 2018-03-09 15:17:47 +01:00
qed-cluster.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-l2-cache.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-table.c block/qed: use qemu_iovec_init_buf 2019-02-22 09:42:13 +00:00
qed.c Block layer patches: 2019-02-26 19:04:47 +00:00
qed.h qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
quorum.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
raw-format.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
rbd.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
replication.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
sheepdog.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
snapshot.c block/snapshot: remove bdrv_snapshot_delete_by_id_or_name 2019-02-25 15:03:18 +01:00
ssh.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
stream.c block/stream: use QEMU_IOVEC_INIT_BUF 2019-02-22 09:42:13 +00:00
throttle-groups.c throttle-groups: fix restart coroutine iothread race 2019-01-24 10:02:28 +00:00
throttle.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
trace-events block/sheepdog: Convert from DPRINTF() macro to trace events 2019-01-31 00:38:19 +01:00
vdi.c block: Eliminate the S_1KiB, S_2KiB, ... macros 2019-02-01 13:46:45 +01:00
vhdx-endian.c block/vhdx: Don't take address of fields in packed structs 2018-11-05 15:09:54 +01:00
vhdx-log.c block: Use bdrv_refresh_filename() to pull 2019-02-25 15:11:25 +01:00
vhdx.c block/vhdx: Don't take address of fields in packed structs 2018-11-05 15:09:54 +01:00
vhdx.h qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
vmdk.c Block layer patches: 2019-02-26 19:04:47 +00:00
vpc.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
vvfat.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
vxhs.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
win32-aio.c file-win32: Switch to byte-based callbacks 2018-05-15 16:11:41 +02:00
write-threshold.c qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00