Make OSD::osdmap just a shortcut map pointer to the most recent OSDMap, the
same one that's in the map cache.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This reverts commit 1dc12e3e1d.
The headers and ceph_fs.cc are written such that they can be shared
verbatim between the kernel and userspace code. Omitting the headers
was deliberate, because they differ depending on the build environment.
The default file layout seems fine in config.cc, since it is declared
in config.h, and is a bunch of tunables we generally try to keep in
config.cc.
The previous change changed all PoolHandle uses to IoContext. This
change also renames the variable names.
Also fix a few API functions whose names weren't quite right after the
previous change. rados_pool_list really does just list pools-- it has
nothing to do with ioctxes.
rados_ioctx_change_auid should be rados_ioctx_pool_set_auid. Although it
takes an ioctx as an argument, it operates on the pool.
rados_ioctx_close should just return void. APIs where the close
operation can fail are broken. What is the user supposed to do if
closing doesn't work?
Also, fix a few test programs that got overlooked earlier.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
In writeahead mode, an op could dissappear from jq without immediately
reappearing in q. Thus, q can be empty before seq is requeued and
finished. _journaled_ahead will now enqueue the op in q before removing
from jq.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
This reverts commit c78b29a47d.
This commit introduced an error in parallel journaling mode.
OpSequencer::flush is only meant to ensure that the ops have become
readable, not necessarily journalled.
Extend the map_cache somewhat. Avoid one flush in handle_osd_map by
putting new maps in the cache.
There is still a flush and a sync_and_flush remaining, so we're not done
yet.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
rados_pool_t -> rados_ioctx_t
class PoolCtx -> class IoCtxImpl
class PoolHandle -> class IoCtx
PoolHandle::name() -> IoCtx::get_pool_name()
Replace rados_pool_destroy, PoolHandle::destroy with rados_pool_delete
and Rados::pool_delete.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
rados_write doesn't replace the whole object, but that's what we want in
these old tests. So just rm it first.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Use RAII for rbd, rados, and Image. Their destructors will be called
when main exits, thus doing the cleanup for us. Use auto_ptr for Image.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>