]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomsgr: fix chdir after daemonize
Sage Weil [Wed, 2 Mar 2011 21:10:37 +0000 (13:10 -0800)]
msgr: fix chdir after daemonize

We don't care of the mkdir succeeds. It has dubious value anyway, though;
if you specify a unique directory for the daemon the caller may as well
create it.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'tcmalloc_optimizations'
Greg Farnum [Thu, 3 Mar 2011 00:37:48 +0000 (16:37 -0800)]
Merge branch 'tcmalloc_optimizations'

14 years agotcmalloc: warn if you try and dump without the profiler running.
Greg Farnum [Thu, 3 Mar 2011 00:18:45 +0000 (16:18 -0800)]
tcmalloc: warn if you try and dump without the profiler running.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agotcmalloc: create perfglue handle_command functionality.
Greg Farnum [Wed, 2 Mar 2011 22:28:00 +0000 (14:28 -0800)]
tcmalloc: create perfglue handle_command functionality.

Switch the OSD and MDS to use it, instead of handling
the calls on their own. Note that this is a command interface change!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge remote branch 'origin/master' into locator
Yehuda Sadeh [Thu, 3 Mar 2011 00:04:56 +0000 (16:04 -0800)]
Merge remote branch 'origin/master' into locator

14 years agolocator: pool id is signed
Yehuda Sadeh [Thu, 3 Mar 2011 00:04:15 +0000 (16:04 -0800)]
locator: pool id is signed

14 years agoqa/workunits: added fsstress.sh
Samuel Just [Wed, 2 Mar 2011 23:54:43 +0000 (15:54 -0800)]
qa/workunits: added fsstress.sh

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoosd: drop old ceph_osd_request_head
Sage Weil [Wed, 2 Mar 2011 22:57:11 +0000 (14:57 -0800)]
osd: drop old ceph_osd_request_head

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: new encoding for MOSDOp when OBJECTLOCATOR feature is present
Sage Weil [Wed, 2 Mar 2011 22:57:00 +0000 (14:57 -0800)]
osd: new encoding for MOSDOp when OBJECTLOCATOR feature is present

The new encoding includes the object_locator_t.  It also avoids the old
C struct.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: add OBJECTLOCATOR protocol feature bit
Sage Weil [Wed, 2 Mar 2011 22:56:06 +0000 (14:56 -0800)]
osd: add OBJECTLOCATOR protocol feature bit

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoencode locator information in osd op
Yehuda Sadeh [Wed, 2 Mar 2011 22:24:56 +0000 (14:24 -0800)]
encode locator information in osd op

14 years agotcmalloc: switch the interface.
Greg Farnum [Wed, 2 Mar 2011 22:13:38 +0000 (14:13 -0800)]
tcmalloc: switch the interface.

Previously, we used function pointers. Fun for me to learn about, icky
to actually have!
Now we use our own wrapper functions with two implementations -- one
for with tcmalloc and one without. Make those programs which
are tcmalloc-aware build with the appropriate implementation source
at compile-time, but leave the wrapper function stubs in
no matter what.

While we're at it, implement two of the "MallocExtension" calls in
the OSD.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agotestradospp: don't try to read /etc/ceph/ceph.conf explicitly
Yehuda Sadeh [Wed, 2 Mar 2011 21:58:38 +0000 (13:58 -0800)]
testradospp: don't try to read /etc/ceph/ceph.conf explicitly

14 years agolibrbd: change RBD::open to take a reference to an Image instead of a pointer
Josh Durgin [Wed, 2 Mar 2011 18:11:55 +0000 (10:11 -0800)]
librbd: change RBD::open to take a reference to an Image instead of a pointer

This makes the API more consistent with the librados API.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agodout: Reopen dout after parsing all config opts
Colin Patrick McCabe [Wed, 2 Mar 2011 15:28:10 +0000 (07:28 -0800)]
dout: Reopen dout after parsing all config opts

Reopen the dout stream only after we parse all configuration options.
Specifying --log-file on the command line now works as expected.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodout: remove g_conf.log_to_file
Colin Patrick McCabe [Wed, 2 Mar 2011 15:12:03 +0000 (07:12 -0800)]
dout: remove g_conf.log_to_file

Remove the log_to_file configuration option. Instead, only log to a file
if either log_file or log_dir is set.

This way, command-line options like --log-file=/tmp/foo work as
expected.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'logging'
Colin Patrick McCabe [Wed, 2 Mar 2011 14:40:45 +0000 (06:40 -0800)]
Merge branch 'logging'

14 years agologging: default to foreground logging
Colin Patrick McCabe [Wed, 2 Mar 2011 12:22:20 +0000 (04:22 -0800)]
logging: default to foreground logging

At global constructor time: default to logging everything to stderr.

During common_init: set appropriate logging defaults based on the type
or program (daemon or other).

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: cache map bufferlists until they are flushed to disk
Sage Weil [Wed, 2 Mar 2011 13:51:11 +0000 (05:51 -0800)]
osd: cache map bufferlists until they are flushed to disk

Another thread may share maps with a peer.  Make sure they pull bufferlists
out of our cache if this happens prior to the encoded versions being
written to disk.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agosafe_io: fix signed/unsigned comparisons
Sage Weil [Wed, 2 Mar 2011 13:29:01 +0000 (05:29 -0800)]
safe_io: fix signed/unsigned comparisons

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: drop some dead code
Sage Weil [Wed, 2 Mar 2011 17:50:44 +0000 (09:50 -0800)]
mds: drop some dead code

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix one rename dentry linkage projection case
Sage Weil [Wed, 2 Mar 2011 17:41:20 +0000 (09:41 -0800)]
mds: fix one rename dentry linkage projection case

There are more.  :(

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: trigger discover_all_missing after replay delay
Sage Weil [Tue, 1 Mar 2011 00:05:08 +0000 (16:05 -0800)]
osd: trigger discover_all_missing after replay delay

We were calling discover_all_missing only when we went immediately active,
not after we were in the replay state (which triggers from a timer event
that calls OSD::activate_pg().  Move the call into PG::activate() so that
we catch both callers.

This requires passing in a query_map from the caller.  While we're at it,
clean up some other instances where we are defining a new query_map
deep within the call tree.

Fixes: #847 (I hope)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: handle osd_ping (and ack requests) while !active
Sage Weil [Mon, 28 Feb 2011 22:15:14 +0000 (14:15 -0800)]
osd: handle osd_ping (and ack requests) while !active

In particular, we may start getting ping requests before getting (or while
processing) our first map that makes us go active.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge remote branch 'origin/scrub_noblock'
Sage Weil [Wed, 2 Mar 2011 00:29:59 +0000 (16:29 -0800)]
Merge remote branch 'origin/scrub_noblock'

14 years agoCDentry/CDir/CInode: Add comment on use of boost::pool.
Greg Farnum [Wed, 23 Feb 2011 22:17:48 +0000 (14:17 -0800)]
CDentry/CDir/CInode: Add comment on use of boost::pool.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrados: remove unused member of IoCtx
Josh Durgin [Wed, 2 Mar 2011 00:03:01 +0000 (16:03 -0800)]
librados: remove unused member of IoCtx

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoosd: enable cpu_profiler
Colin Patrick McCabe [Tue, 1 Mar 2011 16:47:14 +0000 (08:47 -0800)]
osd: enable cpu_profiler

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: IoCtx destructor should put reference only if initalized
Yehuda Sadeh [Tue, 1 Mar 2011 23:18:40 +0000 (15:18 -0800)]
librados: IoCtx destructor should put reference only if initalized

14 years agoThread: don't mask signals except in library code
Colin Patrick McCabe [Tue, 1 Mar 2011 16:04:26 +0000 (08:04 -0800)]
Thread: don't mask signals except in library code

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile.am: fix for testlibrbdpp
Yehuda Sadeh [Tue, 1 Mar 2011 23:01:03 +0000 (15:01 -0800)]
Makefile.am: fix for testlibrbdpp

14 years agolibrados: can set up object locator
Yehuda Sadeh [Tue, 1 Mar 2011 22:20:11 +0000 (14:20 -0800)]
librados: can set up object locator

14 years agoMerge branch 'profiler'
Colin Patrick McCabe [Tue, 1 Mar 2011 15:10:22 +0000 (07:10 -0800)]
Merge branch 'profiler'

14 years agolibrados:rados_ioctx_stat -> rados_ioctx_pool_stat
Colin Patrick McCabe [Tue, 1 Mar 2011 14:49:34 +0000 (06:49 -0800)]
librados:rados_ioctx_stat -> rados_ioctx_pool_stat

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobject_locator: fix clear()
Yehuda Sadeh [Tue, 1 Mar 2011 21:52:43 +0000 (13:52 -0800)]
object_locator: fix clear()

14 years agoprofiler: move perftools glue into perfglue/
Colin Patrick McCabe [Mon, 28 Feb 2011 15:42:28 +0000 (07:42 -0800)]
profiler: move perftools glue into perfglue/

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodo_autogen: add -P (--with-profiler)
Colin Patrick McCabe [Mon, 28 Feb 2011 15:42:00 +0000 (07:42 -0800)]
do_autogen: add -P (--with-profiler)

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: cpu profiler hooks
Sage Weil [Thu, 24 Feb 2011 14:48:47 +0000 (06:48 -0800)]
mds: cpu profiler hooks

14 years agoadd --with-profiler to link in google perftools libprofiler
Sage Weil [Thu, 24 Feb 2011 14:00:27 +0000 (06:00 -0800)]
add --with-profiler to link in google perftools libprofiler

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: use atomic_t for reference count
Colin Patrick McCabe [Tue, 1 Mar 2011 14:05:41 +0000 (06:05 -0800)]
librados: use atomic_t for reference count

Use an use atomic_t for the reference count in IoCtxImpl.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: make IoCtxImpl a pointer in WatchContext
Josh Durgin [Tue, 1 Mar 2011 19:47:26 +0000 (11:47 -0800)]
librados: make IoCtxImpl a pointer in WatchContext

Adds get and put to IoCtxImpl for refcounting,
and uses them in WatchContext, which shouldn't
be creating a copy of the IoCtxImpl.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados: decrement refcount of old io_ctx_impl in assignment operator
Josh Durgin [Tue, 1 Mar 2011 19:35:41 +0000 (11:35 -0800)]
librados: decrement refcount of old io_ctx_impl in assignment operator

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados: fix IoCtx::from_rados_ioctx_t
Colin Patrick McCabe [Tue, 1 Mar 2011 12:15:58 +0000 (04:15 -0800)]
librados: fix IoCtx::from_rados_ioctx_t

IoCtx::from_rados_ioctx_t creates an IoCtx out of a rados_ioctx_t.
However, this IoCtx must share ownership of the IoCtxImpl pointer with
the C API user who first called rados_ioctx_create. This must be done
via a reference count inside the IoCtxImpl.

Also add a copy constructor and assignment operator to class IoCtx,
since it's now cheap to have them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoRename radios_ioctx_{open,close} to create/destroy
Colin Patrick McCabe [Tue, 1 Mar 2011 11:38:44 +0000 (03:38 -0800)]
Rename radios_ioctx_{open,close} to create/destroy

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: remove IoCtx::close()
Colin Patrick McCabe [Tue, 1 Mar 2011 11:25:18 +0000 (03:25 -0800)]
librados: remove IoCtx::close()

We decided we don't want IoCtx::close(), since IoCtx::~IoCtx() exists.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotestrados: add object stat test
Josh Durgin [Tue, 1 Mar 2011 18:36:15 +0000 (10:36 -0800)]
testrados: add object stat test

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbd: recreate test pool each time
Josh Durgin [Tue, 1 Mar 2011 18:33:06 +0000 (10:33 -0800)]
testlibrbd: recreate test pool each time

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: unify scrub_received_maps and peer_scrub_maps
Samuel Just [Tue, 1 Mar 2011 01:07:57 +0000 (17:07 -0800)]
PG: unify scrub_received_maps and peer_scrub_maps

Previously, incoming maps were placed into peer_scrub_maps and merged
into scrub_received_maps during scrub_gather_replica_maps.  Now,
sub_op_scrub_map merges the maps into scrub_received_maps directly.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoMake git ignore core files.
Tommi Virtanen [Tue, 1 Mar 2011 00:03:35 +0000 (16:03 -0800)]
Make git ignore core files.

14 years agoMake git ignore python generated files.
Tommi Virtanen [Tue, 1 Mar 2011 00:03:17 +0000 (16:03 -0800)]
Make git ignore python generated files.

14 years agolibrados: Crashed on shutdown if connect was never called.
Tommi Virtanen [Mon, 28 Feb 2011 21:04:00 +0000 (13:04 -0800)]
librados: Crashed on shutdown if connect was never called.

Add a trivial unit test to trigger this.

14 years agoPG: refactor scrubmap comparison and repair logic
Samuel Just [Fri, 11 Feb 2011 22:46:05 +0000 (14:46 -0800)]
PG: refactor scrubmap comparison and repair logic

The previous version gave erroneous results.  This version seems simpler
and can be more easily unit tested as the error detection logic has been
seperated from the repair logic.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: replica_scrub also should not block
Samuel Just [Thu, 10 Feb 2011 21:49:15 +0000 (13:49 -0800)]
PG: replica_scrub also should not block

As with scrub, replica scrub wait()ed for last_update_complete to catch
up to last_update.  Now, it will requeue the message when that condition
is satisfied.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: make scrub non-blocking
Samuel Just [Thu, 10 Feb 2011 20:35:35 +0000 (12:35 -0800)]
PG: make scrub non-blocking

Previously, scrub would block using wait until
1. last_update_applied==last_update and
2. all replica scrub maps are up-to-date

1. is now handled by requeueing scrub once last_update_applied catches
up to last_update. (see op_applied and scrub)

2. is handled in scrub_finalize.  scrub_finalize will be scheduled using
the scrub_finalize_wq once scrub_waiting_on hits 0. (see scrub and
sub_op_scrub_map)

scrub_finalize also handles comparing the maps and reporting/repairing
errors.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoOSD: add scrub_finalize_wq
Samuel Just [Thu, 10 Feb 2011 20:27:11 +0000 (12:27 -0800)]
OSD: add scrub_finalize_wq

Scrub currently blocks while waiting on replica maps and for
last_update_applied==last_update.  Also, the subsequent checking of the
primary and replica maps is done while occupying a disk_tp slot.  The
scrubmap checking will be moved into scrub_finalize and performed in
this wq in the op_tp.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoOSD: activate_map should not do_peer on a replaying pg
Samuel Just [Tue, 22 Feb 2011 23:58:09 +0000 (15:58 -0800)]
OSD: activate_map should not do_peer on a replaying pg

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoosd: share osd->osdmap with map cache
Sage Weil [Mon, 28 Feb 2011 21:11:05 +0000 (13:11 -0800)]
osd: share osd->osdmap with map cache

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>
14 years agoMerge branch 'next'
Sage Weil [Mon, 28 Feb 2011 21:04:15 +0000 (13:04 -0800)]
Merge branch 'next'

14 years agoRevert "move g_default_file_layout into ceph_fs.cc"
Sage Weil [Mon, 28 Feb 2011 20:57:56 +0000 (12:57 -0800)]
Revert "move g_default_file_layout into ceph_fs.cc"

This reverts commit 1dc12e3e1de1ee6aeb3ef11bb3faafa4757b1a65.

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.

14 years agoAdd comment to ceph_fs.cc
Colin Patrick McCabe [Mon, 28 Feb 2011 16:04:52 +0000 (08:04 -0800)]
Add comment to ceph_fs.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibradoshpp: put ceph stuff in namespace librados
Colin Patrick McCabe [Mon, 28 Feb 2011 13:58:03 +0000 (05:58 -0800)]
libradoshpp: put ceph stuff in namespace librados

Try a little bit harder to avoid polluting the user's global namespace
with our stuff.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: don't create unused SnapContext objs
Colin Patrick McCabe [Mon, 28 Feb 2011 13:59:51 +0000 (05:59 -0800)]
librados: don't create unused SnapContext objs

There were some unused temporary variables hanging around.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: fix copy ctor of ObjectIterator
Colin Patrick McCabe [Mon, 28 Feb 2011 13:19:04 +0000 (05:19 -0800)]
librados: fix copy ctor of ObjectIterator

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Mon, 28 Feb 2011 19:19:37 +0000 (11:19 -0800)]
Merge branch 'next'

Conflicts:
src/pybind/rados.py

14 years agocconf: fix clitest
Colin Patrick McCabe [Mon, 28 Feb 2011 11:51:01 +0000 (03:51 -0800)]
cconf: fix clitest

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounittests: remember to use AM_LDFLAGS
Colin Patrick McCabe [Mon, 28 Feb 2011 11:00:38 +0000 (03:00 -0800)]
unittests: remember to use AM_LDFLAGS

remember to use AM_LDFLAGS when setting _LDFLAGS. Otherwise, the global
flags will be lost.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'librados_api' into next
Colin Patrick McCabe [Mon, 28 Feb 2011 09:57:58 +0000 (01:57 -0800)]
Merge branch 'librados_api' into next

14 years agoRename PoolHandle to IoContext: part 2
Colin Patrick McCabe [Sat, 26 Feb 2011 00:38:33 +0000 (16:38 -0800)]
Rename PoolHandle to IoContext: part 2

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>
14 years agotestlibrbd: call rados_connect
Josh Durgin [Sat, 26 Feb 2011 02:04:21 +0000 (18:04 -0800)]
testlibrbd: call rados_connect

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agopybind/rados: Fix invalid variable references in error paths.
Tommi Virtanen [Fri, 25 Feb 2011 23:29:16 +0000 (15:29 -0800)]
pybind/rados: Fix invalid variable references in error paths.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agopybind/rados: Remove unused variable.
Tommi Virtanen [Fri, 25 Feb 2011 23:28:06 +0000 (15:28 -0800)]
pybind/rados: Remove unused variable.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agopybind/rados: version call return type is void.
Tommi Virtanen [Fri, 25 Feb 2011 23:26:49 +0000 (15:26 -0800)]
pybind/rados: version call return type is void.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoFileStore.h: reorder queue operations in _journaled_ahead
Samuel Just [Thu, 24 Feb 2011 20:31:58 +0000 (12:31 -0800)]
FileStore.h: reorder queue operations in _journaled_ahead

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>
14 years agoRevert "FileStore: fix OpSequencer::flush error"
Samuel Just [Thu, 24 Feb 2011 20:42:16 +0000 (12:42 -0800)]
Revert "FileStore: fix OpSequencer::flush error"

This reverts commit c78b29a47d7211a4b8b1585112ac22b8435a82c7.

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.

14 years agoosd: simplify handle_osd_map flushing and map caching
Sage Weil [Fri, 25 Feb 2011 21:41:54 +0000 (13:41 -0800)]
osd: simplify handle_osd_map flushing and map caching

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>
14 years agolibrados: Rename rados_pool_t to rados_ioctx_t
Colin Patrick McCabe [Fri, 25 Feb 2011 18:23:12 +0000 (10:23 -0800)]
librados: Rename rados_pool_t to rados_ioctx_t

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>
14 years agotestradospp: update for new librados API
Josh Durgin [Sat, 26 Feb 2011 00:26:51 +0000 (16:26 -0800)]
testradospp: update for new librados API

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbdpp: convert to new APIs
Josh Durgin [Sat, 26 Feb 2011 00:05:00 +0000 (16:05 -0800)]
testlibrbdpp: convert to new APIs

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotest_common.sh: should rm objects before adding
Colin Patrick McCabe [Fri, 25 Feb 2011 17:08:00 +0000 (09:08 -0800)]
test_common.sh: should rm objects before adding

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>
14 years agorbd: de-globalize rbd, rados, Image
Colin Patrick McCabe [Fri, 25 Feb 2011 16:27:29 +0000 (08:27 -0800)]
rbd: de-globalize rbd, rados, Image

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>
14 years agolibrbd, librados: fix my last commits to use the new librados API
Josh Durgin [Fri, 25 Feb 2011 23:45:49 +0000 (15:45 -0800)]
librbd, librados: fix my last commits to use the new librados API

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados: add snap_get_stamp to C API
Josh Durgin [Fri, 25 Feb 2011 23:28:30 +0000 (15:28 -0800)]
librados: add snap_get_stamp to C API

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotestlibrbdpp: initialize pointers
Josh Durgin [Fri, 25 Feb 2011 22:19:51 +0000 (14:19 -0800)]
testlibrbdpp: initialize pointers

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados, librbd: remove selfmanaged_snap_rollback_object
Josh Durgin [Fri, 25 Feb 2011 22:00:05 +0000 (14:00 -0800)]
librados, librbd: remove selfmanaged_snap_rollback_object

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMerge branch 'librados_api_cpp' into librados_api
Colin Patrick McCabe [Fri, 25 Feb 2011 16:15:11 +0000 (08:15 -0800)]
Merge branch 'librados_api_cpp' into librados_api

Conflicts:
src/include/rbd/librbd.hpp
src/librbd.cc
src/rbd.cc

14 years agotestlibrbdpp: use new librbd api
Josh Durgin [Fri, 25 Feb 2011 21:39:35 +0000 (13:39 -0800)]
testlibrbdpp: use new librbd api

14 years agorbd: update for librbd api changes
Josh Durgin [Fri, 25 Feb 2011 18:57:27 +0000 (10:57 -0800)]
rbd: update for librbd api changes

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrbd: tweak C++ API
Josh Durgin [Fri, 25 Feb 2011 18:54:30 +0000 (10:54 -0800)]
librbd: tweak C++ API

- rename image_open to open and make it return an int
- remove Image::close, replace with destructor
- make Image constructor private

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados: C++ API rework
Colin Patrick McCabe [Thu, 24 Feb 2011 16:14:20 +0000 (08:14 -0800)]
librados: C++ API rework

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoUpdate Debian packaging for 0.26~rc.
Laszlo Boszormenyi [Thu, 24 Feb 2011 21:21:34 +0000 (22:21 +0100)]
Update Debian packaging for 0.26~rc.

Make ceph x86 and x64 only because of build dependency on architecture related
google-perftools.
Put library packages to section lib.

14 years agoFileStore.h: reorder queue operations in _journaled_ahead
Samuel Just [Thu, 24 Feb 2011 20:31:58 +0000 (12:31 -0800)]
FileStore.h: reorder queue operations in _journaled_ahead

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>
14 years agoRevert "FileStore: fix OpSequencer::flush error"
Samuel Just [Thu, 24 Feb 2011 20:42:16 +0000 (12:42 -0800)]
Revert "FileStore: fix OpSequencer::flush error"

This reverts commit c78b29a47d7211a4b8b1585112ac22b8435a82c7.

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.

14 years agorollback rename
Colin Patrick McCabe [Thu, 24 Feb 2011 18:13:09 +0000 (10:13 -0800)]
rollback rename

14 years agorbd: use new librbd C++ api
Josh Durgin [Fri, 25 Feb 2011 01:20:33 +0000 (17:20 -0800)]
rbd: use new librbd C++ api

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrbd: make C++ api nicer
Josh Durgin [Thu, 24 Feb 2011 21:41:55 +0000 (13:41 -0800)]
librbd: make C++ api nicer

Adds Image class and replaces aio_create_completion with a constructor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agov0.26~rc
Sage Weil [Thu, 24 Feb 2011 15:41:23 +0000 (07:41 -0800)]
v0.26~rc

Modernize configure.ac macros, set bug report address to ML.

14 years agomds: fix gratuitous map lookup
Sage Weil [Wed, 23 Feb 2011 23:10:45 +0000 (15:10 -0800)]
mds: fix gratuitous map lookup

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: mark_down connections to any failed peers
Sage Weil [Wed, 23 Feb 2011 22:40:38 +0000 (14:40 -0800)]
mds: mark_down connections to any failed peers

This cleans up messenger state, prevents log spam, and saves a small amount
of memory.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix export cancellation vs nested freezes
Sage Weil [Wed, 23 Feb 2011 22:25:06 +0000 (14:25 -0800)]
mds: fix export cancellation vs nested freezes

Prevent freezes from completing while we are canceling exports.  Otherwise
if we are freezing /a/b and /a, and cancel /a/b, we may inadvertantly
complete the freeze on /a (synchronously) and confuse ourselves.  Pin
all freezes beforehand so that when we cancel each one we do not cause
any others to prematurely complete.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agofilejournal: fix type punning warning, drop unneeded cast
Sage Weil [Thu, 24 Feb 2011 14:12:02 +0000 (06:12 -0800)]
filejournal: fix type punning warning, drop unneeded cast

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>