qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Josh Durgin <josh.durgin@inktank.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] rbd: hook up cache options
Date: Tue, 22 May 2012 11:18:44 +0200	[thread overview]
Message-ID: <4FBB59F4.90600@redhat.com> (raw)
In-Reply-To: <1337287349-7664-1-git-send-email-josh.durgin@inktank.com>

Il 17/05/2012 22:42, Josh Durgin ha scritto:
> +     * Fallback to more conservative semantics if setting cache
> +     * options fails. Ignore errors from setting rbd_cache because the
> +     * only possible error is that the option does not exist, and
> +     * librbd defaults to no caching. If write through caching cannot
> +     * be set up, fall back to no caching.
> +     */
> +    if (flags & BDRV_O_NOCACHE) {
> +        rados_conf_set(s->cluster, "rbd_cache", "false");
> +    } else {
> +        rados_conf_set(s->cluster, "rbd_cache", "true");
> +        if (!(flags & BDRV_O_CACHE_WB)) {
> +            r = rados_conf_set(s->cluster, "rbd_cache_max_dirty", "0");
> +            if (r < 0) {
> +                rados_conf_set(s->cluster, "rbd_cache", "false");
> +            }
> +        }
> +    }

Last time I looked at ceph, rbd_flush was not a full flush of the cache;
it only ensured that the pending requests were sent.  So my questions are:

1) has this changed?  does rbd_flush now flush dirty items when
rbd_cache_max_dirty > 0?

2) should the usage of a cache be conditional on LIBRBD_VERSION_CODE >=
LIBRBD_VERSION(0, 1, 1)?

Thanks,

Paolo

  parent reply	other threads:[~2012-05-22  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 20:42 [Qemu-devel] [PATCH] rbd: hook up cache options Josh Durgin
2012-05-22  8:31 ` Kevin Wolf
2012-05-22  9:18 ` Paolo Bonzini [this message]
2012-05-22 16:24   ` Josh Durgin

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=4FBB59F4.90600@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=josh.durgin@inktank.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).