qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 2/3] file-posix: Drop s->lock_fd
Date: Fri, 16 Nov 2018 15:02:26 +0100	[thread overview]
Message-ID: <1baf27e0-fa37-0d84-5d08-c4dcd788a67e@redhat.com> (raw)
In-Reply-To: <w51lg5tunti.fsf@maestria.local.igalia.com>

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

On 16.11.18 14:58, Alberto Garcia wrote:
> On Fri 16 Nov 2018 02:34:25 PM CET, Max Reitz wrote:
>> To me that looks like a problem in the general reopen code.
>> raw_reopen_prepare() is called and succeeds.  Then
>> bdrv_reopen_prepare() notices the option wasn't handled and therefore
>> fails.  bdrv_reopen_multiple() thus doesn't set bs_entry->prepared to
>> true, which means raw_reopen_abort() won't be called.
>>
>> We should always call either BlockDriver.bdrv_reopen_commit() or
>> BlockDriver.bdrv_reopen_abort() when BlockDriver.bdrv_reopen_prepare()
>> succeeded.
> 
> So you mean getting rid of BlockReopenQueueEntry.prepared altogether?

I mean just calling .bdrv_reopen_abort() in bdrv_reopen_prepare() if
there was an error after .bdrv_reopen_prepare() succeeded.

I have a patch, I'm just trying to think of a useful test...

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-11-16 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11  7:21 [Qemu-devel] [PATCH v5 0/3] file-posix: Simplifications on image locking Fam Zheng
2018-10-11  7:21 ` [Qemu-devel] [PATCH v5 1/3] file-posix: Skip effectiveless OFD lock operations Fam Zheng
2018-10-11  7:21 ` [Qemu-devel] [PATCH v5 2/3] file-posix: Drop s->lock_fd Fam Zheng
2018-11-14 13:54   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-11-16 13:34     ` Max Reitz
2018-11-16 13:58       ` Alberto Garcia
2018-11-16 14:02         ` Max Reitz [this message]
2018-11-16 14:16           ` Max Reitz
2018-10-11  7:21 ` [Qemu-devel] [PATCH v5 3/3] tests: Add unit tests for image locking Fam Zheng
2018-11-08  3:16 ` [Qemu-devel] [PATCH v5 0/3] file-posix: Simplifications on " Fam Zheng
2018-11-08  9:26 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1baf27e0-fa37-0d84-5d08-c4dcd788a67e@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).