Blame SOURCES/kvm-block-dirty-bitmaps-move-comment-block.patch

7711c0
From 4123b978727d577491f84dde507f841c23b6caa4 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 3 Apr 2019 18:18:46 +0200
7711c0
Subject: [PATCH 141/163] block/dirty-bitmaps: move comment block
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190403181857.9693-11-jsnow@redhat.com>
7711c0
Patchwork-id: 85415
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 10/21] block/dirty-bitmaps: move comment block
7711c0
Bugzilla: 1677073
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
7711c0
7711c0
Simply move the big status enum comment block to above the status
7711c0
function, and document it as being deprecated. The whole confusing
7711c0
block can get deleted in three releases time.
7711c0
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Reviewed-by: Eric Blake <eblake@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Message-id: 20190223000614.13894-9-jsnow@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit 1e6fddcd6f2d3b6b8c7584004763b376334a8457)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/dirty-bitmap.c | 36 +++++++++++++++++++-----------------
7711c0
 1 file changed, 19 insertions(+), 17 deletions(-)
7711c0
7711c0
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
7711c0
index 89c9665..e090237 100644
7711c0
--- a/block/dirty-bitmap.c
7711c0
+++ b/block/dirty-bitmap.c
7711c0
@@ -28,22 +28,6 @@
7711c0
 #include "block/block_int.h"
7711c0
 #include "block/blockjob.h"
7711c0
 
7711c0
-/**
7711c0
- * A BdrvDirtyBitmap can be in four possible user-visible states:
7711c0
- * (1) Active:   successor is NULL, and disabled is false: full r/w mode
7711c0
- * (2) Disabled: successor is NULL, and disabled is true: qualified r/w mode,
7711c0
- *               guest writes are dropped, but monitor writes are possible,
7711c0
- *               through commands like merge and clear.
7711c0
- * (3) Frozen:   successor is not NULL.
7711c0
- *               A frozen bitmap cannot be renamed, deleted, cleared, set,
7711c0
- *               enabled, merged to, etc. A frozen bitmap can only abdicate()
7711c0
- *               or reclaim().
7711c0
- *               In this state, the anonymous successor bitmap may be either
7711c0
- *               Active and recording writes from the guest (e.g. backup jobs),
7711c0
- *               but it can be Disabled and not recording writes.
7711c0
- * (4) Locked:   Whether Active or Disabled, the user cannot modify this bitmap
7711c0
- *               in any way from the monitor.
7711c0
- */
7711c0
 struct BdrvDirtyBitmap {
7711c0
     QemuMutex *mutex;
7711c0
     HBitmap *bitmap;            /* Dirty bitmap implementation */
7711c0
@@ -205,7 +189,25 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap)
7711c0
     return !bitmap->disabled;
7711c0
 }
7711c0
 
7711c0
-/* Called with BQL taken.  */
7711c0
+/**
7711c0
+ * bdrv_dirty_bitmap_status: This API is now deprecated.
7711c0
+ * Called with BQL taken.
7711c0
+ *
7711c0
+ * A BdrvDirtyBitmap can be in four possible user-visible states:
7711c0
+ * (1) Active:   successor is NULL, and disabled is false: full r/w mode
7711c0
+ * (2) Disabled: successor is NULL, and disabled is true: qualified r/w mode,
7711c0
+ *               guest writes are dropped, but monitor writes are possible,
7711c0
+ *               through commands like merge and clear.
7711c0
+ * (3) Frozen:   successor is not NULL.
7711c0
+ *               A frozen bitmap cannot be renamed, deleted, cleared, set,
7711c0
+ *               enabled, merged to, etc. A frozen bitmap can only abdicate()
7711c0
+ *               or reclaim().
7711c0
+ *               In this state, the anonymous successor bitmap may be either
7711c0
+ *               Active and recording writes from the guest (e.g. backup jobs),
7711c0
+ *               or it can be Disabled and not recording writes.
7711c0
+ * (4) Locked:   Whether Active or Disabled, the user cannot modify this bitmap
7711c0
+ *               in any way from the monitor.
7711c0
+ */
7711c0
 DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap)
7711c0
 {
7711c0
     if (bdrv_dirty_bitmap_has_successor(bitmap)) {
7711c0
-- 
7711c0
1.8.3.1
7711c0