Re: [Qemu-devel] [PATCH 2/5] block: implemented bdrv_lock_image for raw file

2015-12-23 Thread Daniel P. Berrange
On Wed, Dec 23, 2015 at 10:46:53AM +0300, Denis V. Lunev wrote: > From: Olga Krishtal > > To lock the image file flock (LockFileEx) is used. > We lock file handle/descriptor. If lock is failed - > an error is returned. > > In win32 realization we can lock reagion of bytes within the file. > For

[Qemu-devel] [PATCH 2/5] block: implemented bdrv_lock_image for raw file

2015-12-22 Thread Denis V. Lunev
From: Olga Krishtal To lock the image file flock (LockFileEx) is used. We lock file handle/descriptor. If lock is failed - an error is returned. In win32 realization we can lock reagion of bytes within the file. For this reason we at first have to get file size and only than lock it. Signed-off