From: Eric Blake <eblake@redhat.com>
To: Emanuele Giuseppe Esposito <eesposit@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v2 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE
Date: Fri, 7 May 2021 10:25:56 -0500 [thread overview]
Message-ID: <d2b989cd-8002-328f-e15b-e558903f2bf8@redhat.com> (raw)
In-Reply-To: <20210507151203.39643-5-eesposit@redhat.com>
On 5/7/21 10:12 AM, Emanuele Giuseppe Esposito wrote:
> That would be unsafe in case a rule other than the current one
> is removed while the coroutine has yielded.
> Keep FOREACH_SAFE because suspend_request deletes the current rule.
>
> After this patch, *all* matching rules are deleted before suspending
> the coroutine, rather than just one.
> This doesn't affect the existing testcases.
>
> Use actions_count to see how many yeld to issue.
yield
>
> Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> block/blkdebug.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-05-07 15:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 15:11 [PATCH v2 0/5] blkdebug: fix racing condition when iterating on Emanuele Giuseppe Esposito
2021-05-07 15:11 ` [PATCH v2 1/5] blkdebug: refactor removal of a suspended request Emanuele Giuseppe Esposito
2021-05-07 15:12 ` [PATCH v2 2/5] blkdebug: move post-resume handling to resume_req_by_tag Emanuele Giuseppe Esposito
2021-05-07 15:12 ` [PATCH v2 3/5] blkdebug: track all actions Emanuele Giuseppe Esposito
2021-05-07 15:25 ` Eric Blake
2021-05-07 15:12 ` [PATCH v2 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE Emanuele Giuseppe Esposito
2021-05-07 15:25 ` Eric Blake [this message]
2021-05-07 15:12 ` [PATCH v2 5/5] blkdebug: protect rules and suspended_reqs with a lock Emanuele Giuseppe Esposito
2021-05-07 15:29 ` Eric Blake
2021-05-11 8:37 ` Paolo Bonzini
2021-05-11 9:08 ` Emanuele Giuseppe Esposito
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=d2b989cd-8002-328f-e15b-e558903f2bf8@redhat.com \
--to=eblake@redhat.com \
--cc=eesposit@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@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).