qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH for-2.7 00/15] block: Lock images when opening


From: Denis V. Lunev
Subject: Re: [Qemu-block] [PATCH for-2.7 00/15] block: Lock images when opening
Date: Thu, 14 Apr 2016 09:41:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 04/14/2016 09:23 AM, Fam Zheng wrote:
On Thu, 04/14 09:14, Denis V. Lunev wrote:
On 04/14/2016 08:46 AM, Fam Zheng wrote:
On Thu, 04/14 08:04, Denis V. Lunev wrote:
unfortunately no. If the lock will be on the image file,
we will have get it on the target node on QEMU start
and re-acquire it in bdrv_invalidate_cache.

 From my POW you should not get the lock if
BDRV_O_INACTIVE is set.
That is what I meant. :)

At source: Images are unlocked in bdrv_inactivate().

At destinition: Images are not locked if opened with BDRV_O_INACTIVE, and
are locked in bdrv_invalidate_cache() (at the INMIGRATE -> RUNNING switch).

Fam
it looks I have missed something. The above will work, but
I do not see clause where you set BDRV_O_NOLOCK when BDRV_O_INACTIVE
is set.

Do you mean that we will not reach bdrv_open_common with this flag
set?
I'm updating the patch to also check BDRV_O_INACTIVE in bdrv_open_common in v2.

Fam
thank you for clarification. This should work. I am eager to see the next
version :)

Den



reply via email to

[Prev in Thread] Current Thread [Next in Thread]