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

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