[Qemu-devel] [PATCH v20 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field

Vladimir Sementsov-Ogievskiy posted 30 patches 8 years, 5 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v20 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field
Posted by Vladimir Sementsov-Ogievskiy 8 years, 5 months ago
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 block/dirty-bitmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 90af37287f..f25428868c 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -42,7 +42,8 @@ struct BdrvDirtyBitmap {
     BdrvDirtyBitmap *successor; /* Anonymous child; implies frozen status */
     char *name;                 /* Optional non-empty unique ID */
     int64_t size;               /* Size of the bitmap (Number of sectors) */
-    bool disabled;              /* Bitmap is read-only */
+    bool disabled;              /* Bitmap is disabled. It skips all writes to
+                                   the device */
     int active_iterators;       /* How many iterators are active */
     QLIST_ENTRY(BdrvDirtyBitmap) list;
 };
-- 
2.11.1


Re: [Qemu-devel] [PATCH v20 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field
Posted by John Snow 8 years, 5 months ago

On 06/02/2017 07:21 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  block/dirty-bitmap.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 90af37287f..f25428868c 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -42,7 +42,8 @@ struct BdrvDirtyBitmap {
>      BdrvDirtyBitmap *successor; /* Anonymous child; implies frozen status */
>      char *name;                 /* Optional non-empty unique ID */
>      int64_t size;               /* Size of the bitmap (Number of sectors) */
> -    bool disabled;              /* Bitmap is read-only */
> +    bool disabled;              /* Bitmap is disabled. It skips all writes to
> +                                   the device */


Or, "Bitmap is disabled. Writes to the device are ignored." or similar.

It's not very important.

Reviewed-by: John Snow <jsnow@redhat.com>

>      int active_iterators;       /* How many iterators are active */
>      QLIST_ENTRY(BdrvDirtyBitmap) list;
>  };
> 

Re: [Qemu-devel] [PATCH v20 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field
Posted by Max Reitz 8 years, 4 months ago
On 2017-06-02 23:02, John Snow wrote:
> 
> 
> On 06/02/2017 07:21 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
>>  block/dirty-bitmap.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
>> index 90af37287f..f25428868c 100644
>> --- a/block/dirty-bitmap.c
>> +++ b/block/dirty-bitmap.c
>> @@ -42,7 +42,8 @@ struct BdrvDirtyBitmap {
>>      BdrvDirtyBitmap *successor; /* Anonymous child; implies frozen status */
>>      char *name;                 /* Optional non-empty unique ID */
>>      int64_t size;               /* Size of the bitmap (Number of sectors) */
>> -    bool disabled;              /* Bitmap is read-only */
>> +    bool disabled;              /* Bitmap is disabled. It skips all writes to
>> +                                   the device */
> 
> 
> Or, "Bitmap is disabled. Writes to the device are ignored." or similar.

I'd like "It ignores all writes to the device" the most. :-)

("Writes are ignored" sounds a bit like they are ignored in general, not
just by this bitmap; and "it skips" just sounds a bit weird.)

> It's not very important.

Discussing the non-important stuff is the most fun!

Reviewed-by: Max Reitz <mreitz@redhat.com>

> Reviewed-by: John Snow <jsnow@redhat.com>
> 
>>      int active_iterators;       /* How many iterators are active */
>>      QLIST_ENTRY(BdrvDirtyBitmap) list;
>>  };
>>