From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH v4 2/4] block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h
Date: Tue, 28 Apr 2015 14:27:50 +0100 [thread overview]
Message-ID: <1430227672-7670-3-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1430227672-7670-1-git-send-email-stefanha@redhat.com>
The dirty bitmap functions are called from the block I/O processing
code. Make them visible to block_int.h users so they can be used
outside block.c.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block.c | 12 ++++--------
include/block/block_int.h | 4 ++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/block.c b/block.c
index 1f0a4e2..3b865ee 100644
--- a/block.c
+++ b/block.c
@@ -110,10 +110,6 @@ static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
static QLIST_HEAD(, BlockDriver) bdrv_drivers =
QLIST_HEAD_INITIALIZER(bdrv_drivers);
-static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors);
-static void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors);
static void bdrv_dirty_bitmap_truncate(BlockDriverState *bs);
/* If non-zero, use only whitelisted block drivers */
static int use_bdrv_whitelist;
@@ -5787,8 +5783,8 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap)
hbitmap_reset(bitmap->bitmap, 0, bitmap->size);
}
-static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors)
+void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
+ int nr_sectors)
{
BdrvDirtyBitmap *bitmap;
QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) {
@@ -5799,8 +5795,8 @@ static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
}
}
-static void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors)
+void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
+ int nr_sectors)
{
BdrvDirtyBitmap *bitmap;
QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) {
diff --git a/include/block/block_int.h b/include/block/block_int.h
index e0d5561..5ad20b2 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -626,4 +626,8 @@ bool blk_dev_is_tray_open(BlockBackend *blk);
bool blk_dev_is_medium_locked(BlockBackend *blk);
void blk_dev_resize_cb(BlockBackend *blk);
+void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector, int nr_sectors);
+void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
+ int nr_sectors);
+
#endif /* BLOCK_INT_H */
--
2.1.0
next prev parent reply other threads:[~2015-04-28 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 13:27 [Qemu-devel] [PATCH v4 0/4] block: move I/O request processing to block/io.c Stefan Hajnoczi
2015-04-28 13:27 ` [Qemu-devel] [PATCH v4 1/4] block: replace bdrv_states iteration with bdrv_next() Stefan Hajnoczi
2015-04-28 13:27 ` Stefan Hajnoczi [this message]
2015-04-28 13:27 ` [Qemu-devel] [PATCH v4 3/4] block: extract bdrv_setup_io_funcs() Stefan Hajnoczi
2015-04-28 13:27 ` [Qemu-devel] [PATCH v4 4/4] block: move I/O request processing to block/io.c Stefan Hajnoczi
2015-04-28 13:49 ` [Qemu-devel] [PATCH v4 0/4] " Kevin Wolf
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=1430227672-7670-3-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--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).