From: Josh Durgin <josh.durgin@inktank.com>
To: adamcrume@gmail.com, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] rbd: Add support for bdrv_invalidate_cache
Date: Thu, 09 Oct 2014 14:05:10 -0700 [thread overview]
Message-ID: <5436F886.4020702@inktank.com> (raw)
In-Reply-To: <1412880272-3154-1-git-send-email-adamcrume@gmail.com>
[adding block maintainers to cc]
On 10/09/2014 11:44 AM, adamcrume@gmail.com wrote:
> From: Adam Crume <adamcrume@gmail.com>
>
> This fixes Ceph issue 2467.
>
> Signed-off-by: Adam Crume <adamcrume@gmail.com>
> ---
> block/rbd.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/block/rbd.c b/block/rbd.c
> index 96947e3..d88ba70 100644
> --- a/block/rbd.c
> +++ b/block/rbd.c
> @@ -887,6 +887,19 @@ static BlockDriverAIOCB* qemu_rbd_aio_discard(BlockDriverState *bs,
> }
> #endif
>
> +#ifdef LIBRBD_SUPPORTS_INVALIDATE
> +static void qemu_rbd_invalidate_cache(BlockDriverState *bs,
> + Error **errp)
> +{
> + BDRVRBDState *s = bs->opaque;
> + int r = rbd_invalidate_cache(s->image);
> + if (r < 0) {
> + error_setg_errno(errp, -r, "Failed to invalidate the cache");
> + }
> + return r;
No return needed here. With that fixed:
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
> +}
> +#endif
> +
> static QemuOptsList qemu_rbd_create_opts = {
> .name = "rbd-create-opts",
> .head = QTAILQ_HEAD_INITIALIZER(qemu_rbd_create_opts.head),
> @@ -936,6 +949,9 @@ static BlockDriver bdrv_rbd = {
> .bdrv_snapshot_delete = qemu_rbd_snap_remove,
> .bdrv_snapshot_list = qemu_rbd_snap_list,
> .bdrv_snapshot_goto = qemu_rbd_snap_rollback,
> +#ifdef LIBRBD_SUPPORTS_INVALIDATE
> + .bdrv_invalidate_cache = qemu_rbd_invalidate_cache,
> +#endif
> };
>
> static void bdrv_rbd_init(void)
>
next prev parent reply other threads:[~2014-10-09 21:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 18:44 [Qemu-devel] [PATCH] rbd: Add support for bdrv_invalidate_cache adamcrume
2014-10-09 21:05 ` Josh Durgin [this message]
2014-10-10 9:22 ` Stefan Hajnoczi
2014-10-28 15:06 ` Stefan Hajnoczi
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=5436F886.4020702@inktank.com \
--to=josh.durgin@inktank.com \
--cc=adamcrume@gmail.com \
--cc=kwolf@redhat.com \
--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 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.