From: Kevin Wolf <kwolf@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: aio-context question
Date: Mon, 23 Mar 2020 18:07:10 +0100 [thread overview]
Message-ID: <20200323170710.GC8049@linux.fritz.box> (raw)
In-Reply-To: <1577640273.5.1584605618249@webmail.proxmox.com>
Am 19.03.2020 um 09:13 hat Dietmar Maurer geschrieben:
> I just saw commit 30dd65f307b647eef8156c4a33bd007823ef85cb, and noticed that
> a similar pattern in drive_backup_prepare() and blockdev_backup_prepare().
>
> The calls to bdrv_try_set_aio_context() seems useless, because we already do
> that later in backup_job_create/brdv_attach.
>
> But I am not 100%& sure?
I'm aware that this is a common pattern (and I thought it was more than
just two additional places), but we would have to check for each place
individually whether it can be removed.
If it doesn't have any effect because it just does what will be done
later anyway, it can be removed, but that doesn't buy us much.
If it results in preventing some case (like the one fixed by 30dd65f3),
we need to check whether this case is actually safe. If it is safe, we
can remove the lines and get a new feature from it.
In both cases, I think a test case should be written together with the
removal of the code. And if we find out that it's unsafe, we should even
more write a test case that makes sure that the operation fails.
Kevin
next prev parent reply other threads:[~2020-03-23 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 8:13 aio-context question Dietmar Maurer
2020-03-23 17:07 ` Kevin Wolf [this message]
2020-03-23 18:13 ` Dietmar Maurer
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=20200323170710.GC8049@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=dietmar@proxmox.com \
--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).