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] [PULL 02/14] block: remove unused bdrv_media_changed
Date: Wed,  6 Sep 2017 16:02:34 +0200	[thread overview]
Message-ID: <20170906140246.7326-3-kwolf@redhat.com> (raw)
In-Reply-To: <20170906140246.7326-1-kwolf@redhat.com>

From: Manos Pitsidianakis <el13635@mail.ntua.gr>

This function is not used anywhere, so remove it.

Markus Armbruster adds:
The i82078 floppy device model used to call bdrv_media_changed() to
implement its media change bit when backed by a host floppy.  This
went away in 21fcf36 "fdc: simplify media change handling".
Probably broke host floppy media change.  Host floppy pass-through
was dropped in commit f709623.  bdrv_media_changed() has never been
used for anything else.  Remove it.
(Source is Message-ID: <87y3ruaypm.fsf@dusky.pond.sub.org>)

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 include/block/block.h     |  1 -
 include/block/block_int.h |  1 -
 block.c                   | 14 --------------
 block/raw-format.c        |  6 ------
 4 files changed, 22 deletions(-)

diff --git a/include/block/block.h b/include/block/block.h
index ab80195378..2ad18775af 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -441,7 +441,6 @@ int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only,
 int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp);
 bool bdrv_is_sg(BlockDriverState *bs);
 bool bdrv_is_inserted(BlockDriverState *bs);
-int bdrv_media_changed(BlockDriverState *bs);
 void bdrv_lock_medium(BlockDriverState *bs, bool locked);
 void bdrv_eject(BlockDriverState *bs, bool eject_flag);
 const char *bdrv_get_format_name(BlockDriverState *bs);
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 71183cc76e..ca4e7e5629 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -248,7 +248,6 @@ struct BlockDriver {
 
     /* removable device specific */
     bool (*bdrv_is_inserted)(BlockDriverState *bs);
-    int (*bdrv_media_changed)(BlockDriverState *bs);
     void (*bdrv_eject)(BlockDriverState *bs, bool eject_flag);
     void (*bdrv_lock_medium)(BlockDriverState *bs, bool locked);
 
diff --git a/block.c b/block.c
index 175e8d35ff..6dd47e414e 100644
--- a/block.c
+++ b/block.c
@@ -4192,20 +4192,6 @@ bool bdrv_is_inserted(BlockDriverState *bs)
 }
 
 /**
- * Return whether the media changed since the last call to this
- * function, or -ENOTSUP if we don't know.  Most drivers don't know.
- */
-int bdrv_media_changed(BlockDriverState *bs)
-{
-    BlockDriver *drv = bs->drv;
-
-    if (drv && drv->bdrv_media_changed) {
-        return drv->bdrv_media_changed(bs);
-    }
-    return -ENOTSUP;
-}
-
-/**
  * If eject_flag is TRUE, eject the media. Otherwise, close the tray
  */
 void bdrv_eject(BlockDriverState *bs, bool eject_flag)
diff --git a/block/raw-format.c b/block/raw-format.c
index 142649ed56..ab552c0954 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -372,11 +372,6 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset,
     return bdrv_truncate(bs->file, offset, prealloc, errp);
 }
 
-static int raw_media_changed(BlockDriverState *bs)
-{
-    return bdrv_media_changed(bs->file->bs);
-}
-
 static void raw_eject(BlockDriverState *bs, bool eject_flag)
 {
     bdrv_eject(bs->file->bs, eject_flag);
@@ -510,7 +505,6 @@ BlockDriver bdrv_raw = {
     .bdrv_refresh_limits  = &raw_refresh_limits,
     .bdrv_probe_blocksizes = &raw_probe_blocksizes,
     .bdrv_probe_geometry  = &raw_probe_geometry,
-    .bdrv_media_changed   = &raw_media_changed,
     .bdrv_eject           = &raw_eject,
     .bdrv_lock_medium     = &raw_lock_medium,
     .bdrv_co_ioctl        = &raw_co_ioctl,
-- 
2.13.5

  parent reply	other threads:[~2017-09-06 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06 14:02 [Qemu-devel] [PULL 00/14] Block layer patches Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 01/14] block: pass bdrv_* methods to bs->file by default in block filters Kevin Wolf
2017-09-06 14:02 ` Kevin Wolf [this message]
2017-09-06 14:02 ` [Qemu-devel] [PULL 03/14] block: remove bdrv_truncate callback in blkdebug Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 04/14] block: add default implementations for bdrv_co_get_block_status() Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 05/14] qcow: Change signature of get_cluster_offset() Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 06/14] qcow: Check failure of bdrv_getlength() and bdrv_truncate() Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 07/14] block: document semantics of bdrv_co_preadv|pwritev Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 08/14] block: move ThrottleGroup membership to ThrottleGroupMember Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 09/14] block: add aio_context field in ThrottleGroupMember Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 10/14] block: tidy ThrottleGroupMember initializations Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 11/14] block: convert ThrottleGroup to object with QOM Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 12/14] block: add throttle block filter driver Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 13/14] qemu-iotests: add 184 for throttle " Kevin Wolf
2017-09-06 14:02 ` [Qemu-devel] [PULL 14/14] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing Kevin Wolf
2017-09-07 10:50 ` [Qemu-devel] [PULL 00/14] Block layer patches Peter Maydell

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=20170906140246.7326-3-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.