qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xie Yongji <xieyongji@bytedance.com>
To: mst@redhat.com, jasowang@redhat.com, stefanha@redhat.com,
	sgarzare@redhat.com, kwolf@redhat.com, mreitz@redhat.com,
	mlureau@redhat.com
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: [PATCH v2 1/6] block: Support passing NULL ops to blk_set_dev_ops()
Date: Tue, 15 Feb 2022 18:59:38 +0800	[thread overview]
Message-ID: <20220215105943.90-2-xieyongji@bytedance.com> (raw)
In-Reply-To: <20220215105943.90-1-xieyongji@bytedance.com>

This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
---
 block/block-backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/block-backend.c b/block/block-backend.c
index 4ff6b4d785..08dd0a3093 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1015,7 +1015,7 @@ void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops,
     blk->dev_opaque = opaque;
 
     /* Are we currently quiesced? Should we enforce this right now? */
-    if (blk->quiesce_counter && ops->drained_begin) {
+    if (blk->quiesce_counter && ops && ops->drained_begin) {
         ops->drained_begin(opaque);
     }
 }
-- 
2.20.1



  reply	other threads:[~2022-02-15 11:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 10:59 [PATCH v2 0/6] Support exporting BDSs via VDUSE Xie Yongji
2022-02-15 10:59 ` Xie Yongji [this message]
2022-03-14 17:23   ` [PATCH v2 1/6] block: Support passing NULL ops to blk_set_dev_ops() Stefan Hajnoczi
2022-03-14 19:09     ` John Snow
2022-03-15  8:47       ` Stefan Hajnoczi
2022-03-15 19:30         ` John Snow
2022-03-16 12:18           ` Stefan Hajnoczi
2022-03-17  8:57             ` Kevin Wolf
2022-02-15 10:59 ` [PATCH v2 2/6] linux-headers: Add vduse.h Xie Yongji
2022-02-15 10:59 ` [PATCH v2 3/6] libvduse: Add VDUSE (vDPA Device in Userspace) library Xie Yongji
2022-03-15  9:48   ` Stefan Hajnoczi
2022-03-15 11:38     ` Yongji Xie
2022-03-16 13:28       ` Stefan Hajnoczi
2022-03-16 13:49         ` Yongji Xie
2022-03-16 15:51           ` Stefan Hajnoczi
2022-03-17  2:15             ` Yongji Xie
2022-02-15 10:59 ` [PATCH v2 4/6] vduse-blk: implements vduse-blk export Xie Yongji
2022-03-15 11:08   ` Stefan Hajnoczi
2022-03-15 11:52     ` Yongji Xie
2022-03-16 12:16       ` Stefan Hajnoczi
2022-03-16 13:24         ` Yongji Xie
2022-02-15 10:59 ` [PATCH v2 5/6] vduse-blk: Add vduse-blk resize support Xie Yongji
2022-03-15 13:36   ` Stefan Hajnoczi
2022-02-15 10:59 ` [PATCH v2 6/6] libvduse: Add support for reconnecting Xie Yongji
2022-03-15 13:48   ` Stefan Hajnoczi
2022-03-16  2:33     ` Yongji Xie
2022-03-09 15:37 ` [PATCH v2 0/6] Support exporting BDSs via VDUSE Stefan Hajnoczi

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=20220215105943.90-2-xieyongji@bytedance.com \
    --to=xieyongji@bytedance.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mlureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.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 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).