From: Manos Pitsidianakis <el13635@mail.ntua.gr>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-block <qemu-block@nongnu.org>,
Eric Blake <eblake@redhat.com>, Alberto Garcia <berto@igalia.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PATCH v5 3/4] block: remove bdrv_truncate callback in blkdebug
Date: Thu, 13 Jul 2017 13:01:16 +0300 [thread overview]
Message-ID: <20170713100117.11961-4-el13635@mail.ntua.gr> (raw)
In-Reply-To: <20170713100117.11961-1-el13635@mail.ntua.gr>
Now that bdrv_truncate is passed to bs->file by default, remove the
callback from block/blkdebug.c and set is_filter to true.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
---
block/blkdebug.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index c19ab28f07..91ffd1fe12 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -821,12 +821,6 @@ static int64_t blkdebug_getlength(BlockDriverState *bs)
return bdrv_getlength(bs->file->bs);
}
-static int blkdebug_truncate(BlockDriverState *bs, int64_t offset,
- PreallocMode prealloc, Error **errp)
-{
- return bdrv_truncate(bs->file, offset, prealloc, errp);
-}
-
static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options)
{
BDRVBlkdebugState *s = bs->opaque;
@@ -909,6 +903,7 @@ static BlockDriver bdrv_blkdebug = {
.format_name = "blkdebug",
.protocol_name = "blkdebug",
.instance_size = sizeof(BDRVBlkdebugState),
+ .is_filter = true,
.bdrv_parse_filename = blkdebug_parse_filename,
.bdrv_file_open = blkdebug_open,
@@ -917,7 +912,6 @@ static BlockDriver bdrv_blkdebug = {
.bdrv_child_perm = bdrv_filter_default_perms,
.bdrv_getlength = blkdebug_getlength,
- .bdrv_truncate = blkdebug_truncate,
.bdrv_refresh_filename = blkdebug_refresh_filename,
.bdrv_refresh_limits = blkdebug_refresh_limits,
--
2.11.0
next prev parent reply other threads:[~2017-07-13 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 10:01 [Qemu-devel] [PATCH v5 0/4] block: Block driver callbacks fixes Manos Pitsidianakis
2017-07-13 10:01 ` [Qemu-devel] [PATCH v5 1/4] block: pass bdrv_* methods to bs->file by default in block filters Manos Pitsidianakis
2017-07-13 11:23 ` Eric Blake
2017-07-13 11:39 ` Manos Pitsidianakis
2017-07-13 10:01 ` [Qemu-devel] [PATCH v5 2/4] block: remove unused bdrv_media_changed Manos Pitsidianakis
2017-07-13 10:01 ` Manos Pitsidianakis [this message]
2017-07-13 10:01 ` [Qemu-devel] [PATCH v5 4/4] block: add default implementations for bdrv_co_get_block_status() Manos Pitsidianakis
2017-07-13 11:18 ` [Qemu-devel] [PATCH v5 0/4] block: Block driver callbacks fixes 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=20170713100117.11961-4-el13635@mail.ntua.gr \
--to=el13635@mail.ntua.gr \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).