[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/7] dirty-bitmaps: fix comment about dirty_b
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/7] dirty-bitmaps: fix comment about dirty_bitmap_mutex |
Date: |
Thu, 19 Apr 2018 17:21:37 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/16/2018 07:44 AM, Vladimir Sementsov-Ogievskiy wrote:
> Clarify first two cases and fix Modify -> Any access in third case.
> Also, drop 'only' from third case, as it a bit confuses, when thinking
> about case where we modify BdrvDirtyBitmap and access HBitmap.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> include/block/block_int.h | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/include/block/block_int.h b/include/block/block_int.h
> index c4dd1d4bb8..189666efa5 100644
> --- a/include/block/block_int.h
> +++ b/include/block/block_int.h
> @@ -709,10 +709,14 @@ struct BlockDriverState {
> uint64_t write_threshold_offset;
> NotifierWithReturn write_threshold_notifier;
>
> - /* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex.
> - * Reading from the list can be done with either the BQL or the
> - * dirty_bitmap_mutex. Modifying a bitmap only requires
> - * dirty_bitmap_mutex. */
> + /* Writing to the list (i.e. to any field of BdrvDirtyBitmap or to the
> + * list-head) requires both the BQL _and_ the dirty_bitmap_mutex.
> + *
> + * Reading from the list (from any field of BdrvDirtyBitmap or from the
> + * list-head) can be done with either the BQL or the dirty_bitmap_mutex.
> + *
> + * Any access to underlying HBitmap requires dirty_bitmap_mutex.
"to the underlying HBitmap," probably.
> + */
> QemuMutex dirty_bitmap_mutex;
> QLIST_HEAD(, BdrvDirtyBitmap) dirty_bitmaps;
>
>
Reviewed-by: John Snow <address@hidden>
- [Qemu-devel] [PATCH v2 for-2.13 0/7] Dirty bitmaps fixing and refactoring, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 1/7] block/dirty-bitmap: add lock to bdrv_enable/disable_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 7/7] blockdev: unify block-dirty-bitmap-clear command and transaction action, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 5/7] blockdev: refactor block-dirty-bitmap-clear transaction, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 2/7] dirty-bitmaps: fix comment about dirty_bitmap_mutex, Vladimir Sementsov-Ogievskiy, 2018/04/16
- Re: [Qemu-devel] [PATCH v2 2/7] dirty-bitmaps: fix comment about dirty_bitmap_mutex,
John Snow <=
- [Qemu-devel] [PATCH v2 6/7] block/dirty-bitmap: bdrv_clear_dirty_bitmap: drop unused parameter, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 4/7] dirty-bitmap: separate unused meta-bitmap related functions, Vladimir Sementsov-Ogievskiy, 2018/04/16
- [Qemu-devel] [PATCH v2 3/7] dirty-bitmap: remove missed bdrv_dirty_bitmap_get_autoload header, Vladimir Sementsov-Ogievskiy, 2018/04/16