]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: add options to enable balanced or localized reads for snapshots 275/head
authorJosh Durgin <josh.durgin@inktank.com>
Sun, 12 May 2013 21:53:26 +0000 (14:53 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 13 May 2013 02:31:22 +0000 (19:31 -0700)
commit13ae13a9068afcd4eb4b3574c46875cad8c91ab6
tree9baa7f3876e9e9a660ca4fbf8cdf38198803b722
parent0c7414b1de75e62db04b40797036e16ab64487e8
librbd: add options to enable balanced or localized reads for snapshots

Since snapshots never change, it's safe to read from replicas for them.
A common use for this would be reading from a parent snapshot shared by
many clones.

Convert LibrbdWriteback and AioRead to use the ObjectOperation api
so we can set flags. Fortunately the external wrapper holds no data,
so its lifecycle doesn't need to be managed.

Include a simple workunit that sets the flags in various combinations
and looks for their presence in the logs from 'rbd export'.

Fixes: #3064
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
qa/workunits/rbd/read-flags.sh [new file with mode: 0755]
src/common/config_opts.h
src/librbd/AioRequest.cc
src/librbd/AioRequest.h
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h
src/librbd/LibrbdWriteback.cc