qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5] block/file-win32: add reopen handlers


From: Hanna Reitz
Subject: Re: [PATCH v5] block/file-win32: add reopen handlers
Date: Wed, 1 Sep 2021 13:27:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 25.08.21 19:36, Viktor Prutyanov wrote:
Make 'qemu-img commit' work on Windows.

Command 'commit' requires reopening backing file in RW mode. So,
add reopen prepare/commit/abort handlers and change dwShareMode
for CreateFile call in order to allow further read/write reopening.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/418

Suggested-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Tested-by: Helge Konetzka <hk@zapateado.de>
---
  v2:
     - fix indentation in raw_reopen_prepare
     - free rs if raw_reopen_prepare fails
  v3:
     - restore suggested-by field missed in v2
  v4:
     - add file type check
     - add comment about options
     - replace rs check with assert in raw_reopen_commit
  v5:
     - add CloseHandle at AIO attach fail

  block/file-win32.c | 101 ++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 100 insertions(+), 1 deletion(-)

Thanks!  I’ve applied this patch to my block branch:

https://github.com/XanClic/qemu/commits/block

Hanna




reply via email to

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