[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v4 2/6] block/dirty-bitmaps: fix merge permissio
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-block] [PATCH v4 2/6] block/dirty-bitmaps: fix merge permissions |
Date: |
Wed, 3 Oct 2018 13:01:11 +0000 |
03.10.2018 02:02, John Snow wrote:
> In prior commits that made merge transactionable, we removed the
> assertion that merge cannot operate on disabled bitmaps. In addition,
> we want to make sure that we are prohibiting merges to "locked" bitmaps.
>
> Use the new user_locked function to check.
>
> Reported-by: Eric Blake <address@hidden>
> Signed-off-by: John Snow <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> block/dirty-bitmap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 85bc668f6a..8a6e07930f 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -806,9 +806,9 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const
> BdrvDirtyBitmap *src,
>
> qemu_mutex_lock(dest->mutex);
>
> - if (bdrv_dirty_bitmap_frozen(dest)) {
> - error_setg(errp, "Bitmap '%s' is frozen and cannot be modified",
> - dest->name);
> + if (bdrv_dirty_bitmap_user_locked(dest)) {
> + error_setg(errp, "Bitmap '%s' is currently in use by another"
> + " operation and cannot be modified", dest->name);
> goto out;
> }
>
--
Best regards,
Vladimir
- Re: [Qemu-block] [PATCH v4 1/6] block/dirty-bitmaps: add user_locked status checker, (continued)
[Qemu-block] [PATCH v4 3/6] block/dirty-bitmaps: allow clear on disabled bitmaps, John Snow, 2018/10/02
[Qemu-block] [PATCH v4 6/6] nbd: forbid use of frozen bitmaps, John Snow, 2018/10/02
[Qemu-block] [PATCH v4 2/6] block/dirty-bitmaps: fix merge permissions, John Snow, 2018/10/02
[Qemu-block] [PATCH v4 5/6] block/backup: prohibit backup from using in use bitmaps, John Snow, 2018/10/02
[Qemu-block] [PATCH v4 4/6] block/dirty-bitmaps: prohibit enable/disable on locked/frozen bitmaps, John Snow, 2018/10/02
Re: [Qemu-block] [PATCH v4 0/6] dirty-bitmaps: fix QMP command permissions, John Snow, 2018/10/03
Re: [Qemu-block] [PATCH v4 0/6] dirty-bitmaps: fix QMP command permissions, Eric Blake, 2018/10/17