All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: vsementsov@virtuozzo.com, qemu-block@nongnu.org,
	s.reiter@proxmox.com, qemu-devel@nongnu.org,
	t.lamprecht@proxmox.com, stefanha@redhat.com,
	dietmar@proxmox.com
Subject: Re: [PATCH for-5.0 v2 2/3] block: Increase BB.in_flight for coroutine interfaces
Date: Tue, 7 Apr 2020 13:13:04 +0200	[thread overview]
Message-ID: <20200407111304.GD7695@linux.fritz.box> (raw)
In-Reply-To: <eead4e39-0784-1550-f245-ebe98e73f17e@redhat.com>

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

Am 07.04.2020 um 12:15 hat Max Reitz geschrieben:
> On 07.04.20 12:04, Max Reitz wrote:
> > On 06.04.20 19:14, Kevin Wolf wrote:
> >> External callers of blk_co_*() don't currently increase the
> >> BlockBackend.in_flight counter, but calls from blk_aio_*() do, so there
> >> is an inconsistency whether the counter has been increased or not.
> >>
> >> This patch moves the actual operations to static functions that can
> >> later know they will always be called with in_flight increased exactly
> >> once, even for external callers using the blk_co_*() coroutine
> >> interfaces.
> >>
> >> If the public blk_co_*() interface is unused, remove it.
> >>
> >> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> >> ---
> >>  include/sysemu/block-backend.h |  1 -
> >>  block/block-backend.c          | 94 +++++++++++++++++++++++++++-------
> >>  2 files changed, 76 insertions(+), 19 deletions(-)
> > 
> > Reviewed-by: Max Reitz <mreitz@redhat.com>
> 
> On second thought (I assumed this would be addressed by the third
> patch), blk_prw() no longer increments in_flight, but the blk_co_*
> functions do that now.  In v1, blk_prw() did that.
> 
> I thought we’d want blk_prw() to set in_flight, just like blk_aio_prwv()
> does, and then let the synchronous functions that use blk_prw() pass the
> blk_do_* functions to it.

Does it make a difference, though?

But the change should be easy enough (inc/dec in blk_prw() and the let
*_entry() call blk_do_*() instead of blk_co_*()) that I guess I can just
do it and send a v3.

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2020-04-07 11:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 17:14 [PATCH for-5.0 v2 0/3] block: Fix blk->in_flight during blk_wait_while_drained() Kevin Wolf
2020-04-06 17:14 ` [PATCH for-5.0 v2 1/3] block-backend: Reorder flush/pdiscard function definitions Kevin Wolf
2020-04-07  5:45   ` Vladimir Sementsov-Ogievskiy
2020-04-07  9:22   ` Max Reitz
2020-04-06 17:14 ` [PATCH for-5.0 v2 2/3] block: Increase BB.in_flight for coroutine interfaces Kevin Wolf
2020-04-07  6:41   ` Vladimir Sementsov-Ogievskiy
2020-04-07  8:52     ` Kevin Wolf
2020-04-07  9:10       ` Vladimir Sementsov-Ogievskiy
2020-04-07  9:48         ` Kevin Wolf
2020-04-07 10:00           ` Vladimir Sementsov-Ogievskiy
2020-04-07 10:04   ` Max Reitz
2020-04-07 10:15     ` Max Reitz
2020-04-07 11:13       ` Kevin Wolf [this message]
2020-04-07 11:27         ` Max Reitz
2020-04-06 17:14 ` [PATCH for-5.0 v2 3/3] block: Fix blk->in_flight during blk_wait_while_drained() Kevin Wolf
2020-04-07  6:52   ` Vladimir Sementsov-Ogievskiy
2020-04-07  8:59     ` Kevin Wolf
2020-04-07  9:15       ` Vladimir Sementsov-Ogievskiy
2020-04-07 10:12   ` Max Reitz

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=20200407111304.GD7695@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=s.reiter@proxmox.com \
    --cc=stefanha@redhat.com \
    --cc=t.lamprecht@proxmox.com \
    --cc=vsementsov@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.