All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] block: Remove blk_set_bs()
Date: Tue, 22 Mar 2016 13:55:25 +0100	[thread overview]
Message-ID: <1458651325-7009-1-git-send-email-kwolf@redhat.com> (raw)

The function is unused since commit f21d96d0 ('block: Use BdrvChild in
BlockBackend').

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/block-backend.c     | 17 -----------------
 include/block/block_int.h |  2 --
 2 files changed, 19 deletions(-)

diff --git a/block/block-backend.c b/block/block-backend.c
index dca21d1..4b44d46 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -371,23 +371,6 @@ BlockDriverState *blk_bs(BlockBackend *blk)
 }
 
 /*
- * Changes the BlockDriverState attached to @blk
- */
-void blk_set_bs(BlockBackend *blk, BlockDriverState *bs)
-{
-    bdrv_ref(bs);
-
-    if (blk->root) {
-        blk->root->bs->blk = NULL;
-        bdrv_root_unref_child(blk->root);
-    }
-    assert(bs->blk == NULL);
-
-    blk->root = bdrv_root_attach_child(bs, "root", &child_root);
-    bs->blk = blk;
-}
-
-/*
  * Return @blk's DriveInfo if any, else null.
  */
 DriveInfo *blk_legacy_dinfo(BlockBackend *blk)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ba6e9ac..a33b0de 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -704,8 +704,6 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
                                   const BdrvChildRole *child_role);
 void bdrv_root_unref_child(BdrvChild *child);
 
-void blk_set_bs(BlockBackend *blk, BlockDriverState *bs);
-
 void blk_dev_change_media_cb(BlockBackend *blk, bool load);
 bool blk_dev_has_removable_media(BlockBackend *blk);
 bool blk_dev_has_tray(BlockBackend *blk);
-- 
1.8.3.1

             reply	other threads:[~2016-03-22 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 12:55 Kevin Wolf [this message]
2016-03-22 16:05 ` [Qemu-devel] [PATCH] block: Remove blk_set_bs() Eric Blake

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=1458651325-7009-1-git-send-email-kwolf@redhat.com \
    --to=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 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.