From: Manos Pitsidianakis <el13635@mail.ntua.gr>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block <qemu-block@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Alberto Garcia <berto@igalia.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] block: add throttle block filter driver
Date: Tue, 18 Jul 2017 12:21:01 +0300 [thread overview]
Message-ID: <20170718092101.vskdqunxuo4ysjpw@postretch> (raw)
In-Reply-To: <20170714094521.4909-6-el13635@mail.ntua.gr>
[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]
On Fri, Jul 14, 2017 at 12:45:19PM +0300, Manos Pitsidianakis wrote:
>+static BlockDriver bdrv_throttle = {
>+ .format_name = "throttle",
>+ .protocol_name = "throttle",
>+ .instance_size = sizeof(ThrottleGroupMember),
>+
>+ .bdrv_file_open = throttle_open,
>+ .bdrv_close = throttle_close,
>+ .bdrv_co_flush = throttle_co_flush,
>+
>+ .bdrv_child_perm = bdrv_filter_default_perms,
>+
>+ .bdrv_getlength = throttle_getlength,
>+
>+ .bdrv_co_preadv = throttle_co_preadv,
>+ .bdrv_co_pwritev = throttle_co_pwritev,
>+
>+ .bdrv_co_pwrite_zeroes = throttle_co_pwrite_zeroes,
>+ .bdrv_co_pdiscard = throttle_co_pdiscard,
>+
>+ .bdrv_recurse_is_first_non_filter = bdrv_recurse_is_first_non_filter,
This is wrong! There should be a separate function to pass
bdrv_recurse_is_first_non_filter to bs->file->bs.
>+ .bdrv_attach_aio_context = throttle_attach_aio_context,
>+ .bdrv_detach_aio_context = throttle_detach_aio_context,
>+
>+ .bdrv_reopen_prepare = throttle_reopen_prepare,
>+ .bdrv_reopen_commit = throttle_reopen_commit,
>+ .bdrv_reopen_abort = throttle_reopen_abort,
>+
>+ .is_filter = true,
>+};
>+
>+static void bdrv_throttle_init(void)
>+{
>+ bdrv_register(&bdrv_throttle);
>+}
>+
>+block_init(bdrv_throttle_init);
>diff --git a/include/qemu/throttle-options.h b/include/qemu/throttle-options.h
>index 182b7896e1..508ee72625 100644
>--- a/include/qemu/throttle-options.h
>+++ b/include/qemu/throttle-options.h
>@@ -29,6 +29,7 @@
> #define QEMU_OPT_BPS_WRITE_MAX "bps-write-max"
> #define QEMU_OPT_BPS_WRITE_MAX_LENGTH "bps-write-max-length"
> #define QEMU_OPT_IOPS_SIZE "iops-size"
>+#define QEMU_OPT_THROTTLE_GROUP_NAME "throttling-group"
>
> #define THROTTLE_OPT_PREFIX "throttling."
> #define THROTTLE_OPTS \
>--
>2.11.0
>
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-07-18 9:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 9:45 [Qemu-devel] [PATCH 0/7] add throttle block driver filter Manos Pitsidianakis
2017-07-14 9:45 ` [Qemu-devel] [PATCH 1/7] block: move ThrottleGroup membership to ThrottleGroupMember Manos Pitsidianakis
2017-07-24 14:36 ` Stefan Hajnoczi
2017-07-14 9:45 ` [Qemu-devel] [PATCH 2/7] block: add aio_context field in ThrottleGroupMember Manos Pitsidianakis
2017-07-24 14:38 ` Stefan Hajnoczi
2017-07-14 9:45 ` [Qemu-devel] [PATCH 3/7] block: tidy ThrottleGroupMember initializations Manos Pitsidianakis
2017-07-24 14:39 ` Stefan Hajnoczi
2017-07-14 9:45 ` [Qemu-devel] [PATCH 4/7] block: convert ThrottleGroup to object with QOM Manos Pitsidianakis
2017-07-24 15:12 ` Stefan Hajnoczi
2017-07-25 10:29 ` Manos Pitsidianakis
2017-07-25 16:09 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-07-25 16:21 ` Manos Pitsidianakis
2017-07-26 11:40 ` Stefan Hajnoczi
2017-07-14 9:45 ` [Qemu-devel] [PATCH 5/7] block: add throttle block filter driver Manos Pitsidianakis
2017-07-18 9:21 ` Manos Pitsidianakis [this message]
2017-07-14 9:45 ` [Qemu-devel] [PATCH 6/7] block: add BlockDevOptionsThrottle to QAPI Manos Pitsidianakis
2017-07-14 9:45 ` [Qemu-devel] [PATCH 7/7] block: add throttle block filter driver interface tests Manos Pitsidianakis
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=20170718092101.vskdqunxuo4ysjpw@postretch \
--to=el13635@mail.ntua.gr \
--cc=berto@igalia.com \
--cc=kwolf@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).