]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoMerge branch 'stable'
Sage Weil [Mon, 14 Mar 2011 20:22:16 +0000 (13:22 -0700)]
Merge branch 'stable'

Conflicts:
src/include/rados/librados.h
src/include/rados/librados.hpp
src/librados.cc

14 years agolibrbd: size_t -> uint64_t on internal resize
Sage Weil [Mon, 14 Mar 2011 20:20:42 +0000 (13:20 -0700)]
librbd: size_t -> uint64_t on internal resize

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: use uint64_t for extent len in extmap
Sage Weil [Mon, 14 Mar 2011 20:15:15 +0000 (13:15 -0700)]
librados: use uint64_t for extent len in extmap

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: fixup rados_trunc
Sage Weil [Mon, 14 Mar 2011 20:13:13 +0000 (13:13 -0700)]
librados: fixup rados_trunc

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: rename statfs to cluster_stat
Yehuda Sadeh [Mon, 14 Mar 2011 18:01:15 +0000 (11:01 -0700)]
librados: rename statfs to cluster_stat

14 years agolibrados: add statfs to C interface
Yehuda Sadeh [Mon, 14 Mar 2011 17:20:01 +0000 (10:20 -0700)]
librados: add statfs to C interface

also rename the corresponding C++ method

14 years agolibrbd: uint64_t for image sizes
Sage Weil [Mon, 14 Mar 2011 16:26:14 +0000 (09:26 -0700)]
librbd: uint64_t for image sizes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados, rbd: off_t -> uint64_t
Sage Weil [Sun, 13 Mar 2011 17:20:15 +0000 (10:20 -0700)]
rados, rbd: off_t -> uint64_t

off_t is 32-bit on 32-bit archs when compiled without _FILE_OFFSET_BITS=64.
Avoid any such ambiguity in the library interface.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoRevert "librados,librbd: use 64-bit offsets and lengths"
Colin Patrick McCabe [Mon, 14 Mar 2011 12:10:48 +0000 (05:10 -0700)]
Revert "librados,librbd: use 64-bit offsets and lengths"

This reverts commit f294b26746a30960971757c42d679208a99995a7.

14 years agologging: disable log_sym_history for non-daemons
Colin Patrick McCabe [Mon, 14 Mar 2011 10:10:33 +0000 (03:10 -0700)]
logging: disable log_sym_history for non-daemons

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: make AioCompletions delete themselves when released
Josh Durgin [Mon, 14 Mar 2011 17:04:54 +0000 (10:04 -0700)]
librados: make AioCompletions delete themselves when released

AioCompletion->release() already accounted for the implementation, but the wrapper was kept around.

14 years agomds: fix stray anchortable debug spam
Sage Weil [Sat, 12 Mar 2011 05:59:37 +0000 (21:59 -0800)]
mds: fix stray anchortable debug spam

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agobuffer: disable buffer alloc tracking by default
Sage Weil [Sat, 12 Mar 2011 05:59:15 +0000 (21:59 -0800)]
buffer: disable buffer alloc tracking by default

This can have high overhead on SMP systems.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrbd: delete block completion after it's finished
Josh Durgin [Sat, 12 Mar 2011 02:44:21 +0000 (18:44 -0800)]
librbd: delete block completion after it's finished

14 years agolibrbd: don't leak rados_completion
Josh Durgin [Sat, 12 Mar 2011 02:11:00 +0000 (18:11 -0800)]
librbd: don't leak rados_completion

The implementation is already referenced by librados callbacks, so it
will stick around.

14 years agolibrados: Remove OperationOp from WatchCtx
Josh Durgin [Sat, 12 Mar 2011 01:08:32 +0000 (17:08 -0800)]
librados: Remove OperationOp from WatchCtx

It was unused and doesn't need to be on the heap.

14 years agolibrados: cleanup RadosClient's objecter instance when destroyed
Josh Durgin [Sat, 12 Mar 2011 00:55:39 +0000 (16:55 -0800)]
librados: cleanup RadosClient's objecter instance when destroyed

14 years agolibrbd: free RBD::AioCompletion when it's released
Josh Durgin [Sat, 12 Mar 2011 00:54:43 +0000 (16:54 -0800)]
librbd: free RBD::AioCompletion when it's released

14 years agodebian: Conflict on earlier -dev packages with sonames.
Tommi Virtanen [Fri, 11 Mar 2011 23:39:56 +0000 (15:39 -0800)]
debian: Conflict on earlier -dev packages with sonames.

This ensures a smooth, automatic transition, by telling apt/dpkg that
it's ok to replace the old package with the new one.

Continuation of 95db4c5cb868c26567e3f5095108481aa7e76a80.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoutime: fix operator double() to use the right number of zeros.
Greg Farnum [Fri, 11 Mar 2011 19:24:59 +0000 (11:24 -0800)]
utime: fix operator double() to use the right number of zeros.

We should probably use a const (or even a #define would be better)
instead of typing out the constant in all these places!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrados,librbd: use 64-bit offsets and lengths
Colin Patrick McCabe [Sat, 12 Mar 2011 01:05:46 +0000 (17:05 -0800)]
librados,librbd: use 64-bit offsets and lengths

size_t is usually 32-bit on 32-bit architectures and 64 on 64-bit ones.
On the other hand, we want our offsets and lengths for librados and
librbd to be 64 bit everywhere. So we need to use uint64_t for offsets
and lengths.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomkcephfs: some fixes
Sage Weil [Sat, 12 Mar 2011 00:22:19 +0000 (16:22 -0800)]
mkcephfs: some fixes

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Fri, 11 Mar 2011 22:57:53 +0000 (14:57 -0800)]
Merge remote branch 'origin/stable'

Conflicts:
debian/control

14 years agoautoconf: Fix typo that made --without-gtk2 not work.
Tommi Virtanen [Fri, 11 Mar 2011 22:46:22 +0000 (14:46 -0800)]
autoconf: Fix typo that made --without-gtk2 not work.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoautoconf: Handle --without-debug, --with-debug=junk properly.
Tommi Virtanen [Fri, 11 Mar 2011 22:11:54 +0000 (14:11 -0800)]
autoconf: Handle --without-debug, --with-debug=junk properly.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoautoconf: Handle --without-profiler, --with-profiler=junk properly.
Tommi Virtanen [Fri, 11 Mar 2011 22:08:15 +0000 (14:08 -0800)]
autoconf: Handle --without-profiler, --with-profiler=junk properly.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodebian: add udev rules
Sage Weil [Fri, 11 Mar 2011 17:43:14 +0000 (09:43 -0800)]
debian: add udev rules

Add /lib/udev/rules.d/50-rbd.rules to debian package.
crbdnamer generates the dev path:
/dev/rbd/<pool>/<name>:<number>

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Conflicts:

debian/rules
src/crbdnamer

14 years agoosd: fix osdmap scanning on pg creation
Sage Weil [Fri, 11 Mar 2011 17:23:06 +0000 (09:23 -0800)]
osd: fix osdmap scanning on pg creation

On PG creation we were scanning the complete history of all osdmaps ever.
Fix initialization of PG::Info::History epoch_created and same_*_since
fields in the base (creation) case to make this work the way it was
supposed to.

Reported-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoDestructors for virtual classes should be virtual
Colin Patrick McCabe [Fri, 11 Mar 2011 14:57:35 +0000 (06:57 -0800)]
Destructors for virtual classes should be virtual

Add -Wnon-virtual-dtor to the makefile. Fix the warnings that were
generated.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoautoconf: If given --with-gtk2, not finding it is fatal.
Tommi Virtanen [Fri, 11 Mar 2011 21:54:27 +0000 (13:54 -0800)]
autoconf: If given --with-gtk2, not finding it is fatal.

Use --with-gtk2=check (default) if you're ok with both cases.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoatomic.h: fix "crappy slow implementation"
Colin Patrick McCabe [Fri, 11 Mar 2011 14:30:52 +0000 (06:30 -0800)]
atomic.h: fix "crappy slow implementation"

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoauth: Let common_init (or CephCrypto::init) init auth crypto.
Tommi Virtanen [Thu, 10 Mar 2011 23:44:01 +0000 (15:44 -0800)]
auth: Let common_init (or CephCrypto::init) init auth crypto.

This avoids doing it in a global constructor.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocommon: Initialize ceph_crypto in common_init.
Tommi Virtanen [Thu, 10 Mar 2011 21:22:56 +0000 (13:22 -0800)]
common: Initialize ceph_crypto in common_init.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoceph_crypto: Implement HMAC-SHA1 wrapper for NSS.
Tommi Virtanen [Thu, 10 Mar 2011 21:21:35 +0000 (13:21 -0800)]
ceph_crypto: Implement HMAC-SHA1 wrapper for NSS.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoceph_crypto: Add unittests for the HMAC-SHA1 compatibility shim.
Tommi Virtanen [Thu, 10 Mar 2011 20:39:42 +0000 (12:39 -0800)]
ceph_crypto: Add unittests for the HMAC-SHA1 compatibility shim.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorgw: Make rgw_main use HMAC-SHA1 via compatibility shim.
Tommi Virtanen [Thu, 10 Mar 2011 20:38:25 +0000 (12:38 -0800)]
rgw: Make rgw_main use HMAC-SHA1 via compatibility shim.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoceph_crypto: Implement MD5 wrapper for NSS.
Tommi Virtanen [Thu, 10 Mar 2011 19:49:17 +0000 (11:49 -0800)]
ceph_crypto: Implement MD5 wrapper for NSS.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoceph_crypto: Add unittests for the MD5 compatibility shim.
Tommi Virtanen [Thu, 10 Mar 2011 19:48:51 +0000 (11:48 -0800)]
ceph_crypto: Add unittests for the MD5 compatibility shim.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorgw: Make rgw_op use MD5 via compatibility shim.
Tommi Virtanen [Tue, 8 Mar 2011 21:49:56 +0000 (13:49 -0800)]
rgw: Make rgw_op use MD5 via compatibility shim.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Change header file guard define, to make room for non-auth crypto.
Tommi Virtanen [Thu, 10 Mar 2011 22:31:31 +0000 (14:31 -0800)]
auth: Change header file guard define, to make room for non-auth crypto.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorgw: use random byte generation in auth/Crypto, instead of CryptoPP.
Tommi Virtanen [Tue, 8 Mar 2011 21:21:51 +0000 (13:21 -0800)]
rgw: use random byte generation in auth/Crypto, instead of CryptoPP.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Add a microbenchmark for AES encrypt/decrypt.
Tommi Virtanen [Tue, 8 Mar 2011 20:41:14 +0000 (12:41 -0800)]
auth: Add a microbenchmark for AES encrypt/decrypt.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Allow using NSS as crypto library.
Tommi Virtanen [Fri, 11 Mar 2011 18:28:58 +0000 (10:28 -0800)]
auth: Allow using NSS as crypto library.

Added new configure flag --with-nss that enables this. NSS is also
automatically used if it is available and CryptoPP is not; use
--without-nss to explicitly forbid this.

No change on rgw crypto yet; rgw won't build without CryptoPP for now.

NSS initialization is in a static constructor for now. All it does is
set some values on in-memory data structures, so as long as no (other)
static constructor tries to use it, everything should just work. While
this could be moved to common_init, there are several other context
initialization steps with NSS, and a later refactoring to share the
results of these can just include NSS init as its first operation, at
practically no cost.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Make error message on bad AES key lenght say the bad length too.
Tommi Virtanen [Fri, 4 Mar 2011 23:30:57 +0000 (15:30 -0800)]
auth: Make error message on bad AES key lenght say the bad length too.

Helps debugging.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Use AES IV constant directly, not via local static pointer.
Tommi Virtanen [Tue, 8 Mar 2011 01:01:06 +0000 (17:01 -0800)]
auth: Use AES IV constant directly, not via local static pointer.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Drop "using namespace", it's almost always used explicitly anyway.
Tommi Virtanen [Wed, 2 Mar 2011 21:26:32 +0000 (13:26 -0800)]
auth: Drop "using namespace", it's almost always used explicitly anyway.

This helps us be agnostic about what crypto library is in use.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Add unit tests to check basic crypto sanity.
Tommi Virtanen [Wed, 2 Mar 2011 21:11:37 +0000 (13:11 -0800)]
auth: Add unit tests to check basic crypto sanity.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoauth: Removed unused function generate_random_string.
Tommi Virtanen [Wed, 2 Mar 2011 17:11:15 +0000 (09:11 -0800)]
auth: Removed unused function generate_random_string.

It doesn't sound like a good idea in the first place, with
embedded zero bytes terminating the string prematurely.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoAdd test/osd/RadosModel.h to noinst_HEADERS.
Tommi Virtanen [Thu, 10 Mar 2011 23:23:56 +0000 (15:23 -0800)]
Add test/osd/RadosModel.h to noinst_HEADERS.

Caught by "make distcheck".

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoautoconf: Complain if libatomic-ops is not found.
Tommi Virtanen [Fri, 11 Mar 2011 21:07:31 +0000 (13:07 -0800)]
autoconf: Complain if libatomic-ops is not found.

Use --without-libatomic-ops if you don't want it.

Fixes part of #826.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoautoconf: Complain if tcmalloc is not found.
Tommi Virtanen [Fri, 11 Mar 2011 20:53:33 +0000 (12:53 -0800)]
autoconf: Complain if tcmalloc is not found.

Use --without-tcmalloc if you don't want it.

Fixes part of #826.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoautoconf: Complain if FUSE is not found.
Tommi Virtanen [Fri, 11 Mar 2011 20:39:22 +0000 (12:39 -0800)]
autoconf: Complain if FUSE is not found.

Use --without-fuse if you don't want it.

Fixes part of #826.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoosd: wait for handle_osd_map transaction ondisk without doing a full sync
Sage Weil [Fri, 11 Mar 2011 20:45:16 +0000 (12:45 -0800)]
osd: wait for handle_osd_map transaction ondisk without doing a full sync

Doing a full sync (forcing a btrfs transaction etc) was just wrong here.
All we (might) care about is whether our Objectstore::Transaction is
stable (in journal or fs) or not.

We are still waiting for those operations to flush to the fs (to be
readable).  That may not be necessary either, but shouldn't have a big
performance impact.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: avoid setting up_thru on new PGs
Sage Weil [Fri, 11 Mar 2011 20:30:35 +0000 (12:30 -0800)]
osd: avoid setting up_thru on new PGs

This trades off the possibility of peering blockage if the OSDs in the
first interval (after pg creation) go down and stay down with avoiding
two osdmap updates for any pg creation.  I think this is reasonable given
that:

 - If the pg did go active, then it did go RW and assuming as much changed
   nothing.
 - If the pg did not go active, then it is empty, and there is no data
   lost.

To do this:

- When peering during the first ever interval, don't bother setting
  up_thru.
- Always mark that interval maybe_went_rw, even though up_thru isn't set
  as such.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agotestlibrbdpp: include assert.h
Colin Patrick McCabe [Fri, 11 Mar 2011 12:56:52 +0000 (04:56 -0800)]
testlibrbdpp: include assert.h

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: librados::WatchCtx needs virtual dtor
Colin Patrick McCabe [Fri, 11 Mar 2011 12:37:09 +0000 (04:37 -0800)]
librados: librados::WatchCtx needs virtual dtor

This one was definitely biting because librados itself calls delete on
these objects, deleting them through a pointer-to-base.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: CapMap: add virtual dtor to virtual class
Colin Patrick McCabe [Fri, 11 Mar 2011 11:32:14 +0000 (03:32 -0800)]
osd: CapMap: add virtual dtor to virtual class

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocrushtool: fix warning seen on i386
Colin Patrick McCabe [Fri, 11 Mar 2011 11:19:13 +0000 (03:19 -0800)]
crushtool: fix warning seen on i386

Fix implicit narrowing warning seen on i386

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotests: add bufferlist unit test
Samuel Just [Tue, 8 Mar 2011 20:06:24 +0000 (12:06 -0800)]
tests: add bufferlist unit test

pushing_back an empty bufferptr to an empty bufferlist should be a noop.
In particular, the bl.begin() should be equal to bl.end().

Signed-off-by: Samuel Just <rexludorum@gmail.com>
14 years agoclitest: Fix tests after osdmaptool --clobber bugfix.
Tommi Virtanen [Fri, 11 Mar 2011 00:37:11 +0000 (16:37 -0800)]
clitest: Fix tests after osdmaptool --clobber bugfix.

Commit 5c8146b55dbd60bdfa47b53b93f2769f7d0524dc fixed clobber,
adjust clitests to match. Reordered test logic to have "fsid
does not change" check cover a run without --clobber.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorados: Add "stat" option, and fix "put" to work on larger block sizes.
Greg Farnum [Thu, 10 Mar 2011 22:06:16 +0000 (14:06 -0800)]
rados: Add "stat" option, and fix "put" to work on larger block sizes.

We didn't have a stat option, now we do.
Previously, "put" allocated its read space on the stack. That meant
the max block size was a little under 8MB, or you got a segfault! Now
it's on the stack, and you can set it as you like.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agodebian: add udev rules
Samuel Just [Tue, 8 Mar 2011 00:03:08 +0000 (16:03 -0800)]
debian: add udev rules

Add /lib/udev/rules.d/50-rbd.rules to debian package.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agodebian: remove so version from -dev packages
Sage Weil [Thu, 10 Mar 2011 21:17:36 +0000 (13:17 -0800)]
debian: remove so version from -dev packages

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agofilestore: assert on ENOTEMPTY
Sage Weil [Thu, 10 Mar 2011 21:06:08 +0000 (13:06 -0800)]
filestore: assert on ENOTEMPTY

ENOTEMPTY implies rmdir failed due to stray crap in the directory.  We
should fail now, instead of later when we restart cosd and have stray
data sitting around.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agofiler: set RMW bit on probe
Sage Weil [Thu, 10 Mar 2011 19:20:54 +0000 (11:20 -0800)]
filer: set RMW bit on probe

Setting the RMW bits on the probe stat call will make the OSD wait for
pending writes on the object to flush to disk.  This was a problem for MDS
takeover: the old instance had writes mid-commit on the OSD when the
journal probe/stat came in, and it didn't "see" the size change because
the PG was in 'delayed' mode and the old MDS's write hadn't been queued
for disk locally.  Simply claiming we are a RMW op will force the PG
into rmw mode so that we know the prior write will be visible.  This is
just fine for the metadata workload.

Fixes: #805
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix peer no missing optimization
Sage Weil [Thu, 10 Mar 2011 18:17:24 +0000 (10:17 -0800)]
osd: fix peer no missing optimization

This shortcut was broken: we need to populate peer_missing with missing
objects in terms of the master log, not the peer's log (which may be old
or even divergent).  This shortcut _only_ makes sense when the peer has
no missing in terms of a log that is perfectly up to date (i.e. matches
our last_update).

Reported-by: Henry Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix missing.rm()
Sage Weil [Thu, 10 Mar 2011 17:54:53 +0000 (09:54 -0800)]
osd: fix missing.rm()

The version specifies which version of the object no longer should be
missing.  We should thus remove it from the missing set if we needed
anything less than OR EQUAL to that version.  (If we are missing something
newer, then missing.rm() is a no-op.)

Make the argument name less weird while we're at it.

Reported-by: Henry Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix merge_log missing calculation at split point when logs diverge
Henry Chang [Thu, 10 Mar 2011 17:44:22 +0000 (09:44 -0800)]
osd: fix merge_log missing calculation at split point when logs diverge

If primary log is something like

 1'1
 1'2
 1'3

and remote log is

 1'1
 1'2
 2'3
 2'4
 2'5

Then 1'2 is the split point, but we should advance p because it exists in both
logs.  Comparing to log.head is not a sufficient check for that.

Signed-off-by: Henry Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: modularize
Sage Weil [Thu, 10 Mar 2011 23:12:22 +0000 (15:12 -0800)]
mkcephfs: modularize

The goal is to support the old "ssh to everything" mode and also a
piecewise mode that lets the administrator do each step and handle
data copying and remote execution themselves.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix keyring loading
Sage Weil [Thu, 10 Mar 2011 23:11:49 +0000 (15:11 -0800)]
osd: fix keyring loading

Load keyring if NOT mkfs.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosdmaptool: don't require clobber to create new osdmap
Sage Weil [Thu, 10 Mar 2011 22:30:35 +0000 (14:30 -0800)]
osdmaptool: don't require clobber to create new osdmap

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoDon't use -i to set id for non-daemons
Colin Patrick McCabe [Thu, 10 Mar 2011 15:41:50 +0000 (07:41 -0800)]
Don't use -i to set id for non-daemons

Due to conflicts, don't use -i to set id except for daemons.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: replace -I with -i, rework --name
Colin Patrick McCabe [Thu, 10 Mar 2011 15:20:12 +0000 (07:20 -0800)]
common: replace -I with -i, rework --name

Remove -I. All programs will take -i to set ID now.

Support setting the type and id simultaneously with --name or -n.

Revise common usage.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocauthtool: remove short form of --create-keyring
Colin Patrick McCabe [Thu, 10 Mar 2011 15:06:59 +0000 (07:06 -0800)]
cauthtool: remove short form of --create-keyring

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'globalfoo'
Colin Patrick McCabe [Thu, 10 Mar 2011 13:34:42 +0000 (05:34 -0800)]
Merge branch 'globalfoo'

14 years agolibrbd.cc: trim includes
Colin Patrick McCabe [Thu, 10 Mar 2011 13:32:07 +0000 (05:32 -0800)]
librbd.cc: trim includes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocram: test --conf=foo cconf syntax
Colin Patrick McCabe [Thu, 10 Mar 2011 13:05:59 +0000 (05:05 -0800)]
cram: test --conf=foo cconf syntax

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon_init: Split common_init into multiple parts
Colin Patrick McCabe [Wed, 9 Mar 2011 16:44:05 +0000 (08:44 -0800)]
common_init: Split common_init into multiple parts

Split common_init into several different parts which can be called
individually from libraries. Eliminate startup_flags.

Create ceph_argparse_pull and ceph_argparse_next.

Split off keyring_init from common_init.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: trim deadcode
Colin Patrick McCabe [Tue, 8 Mar 2011 23:46:20 +0000 (15:46 -0800)]
config: trim deadcode

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoConfUtils::_parse: fix uninitialized var
Colin Patrick McCabe [Wed, 9 Mar 2011 19:43:38 +0000 (11:43 -0800)]
ConfUtils::_parse: fix uninitialized var

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: ConfFile::open: return error code
Colin Patrick McCabe [Wed, 9 Mar 2011 12:55:51 +0000 (04:55 -0800)]
config: ConfFile::open: return error code

Return a integer result code specifying why we failed, if we fail.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agobuild:add common/entity_name.h to noinst_HEADERS
Colin Patrick McCabe [Wed, 9 Mar 2011 12:06:10 +0000 (04:06 -0800)]
build:add common/entity_name.h to noinst_HEADERS

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomakefile:Suppress hash warning in include/encoding
Colin Patrick McCabe [Wed, 9 Mar 2011 11:41:42 +0000 (03:41 -0800)]
makefile:Suppress hash warning in include/encoding

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoSuppress gnu_cxx::hash warning a little bit better
Colin Patrick McCabe [Tue, 8 Mar 2011 23:08:10 +0000 (15:08 -0800)]
Suppress gnu_cxx::hash warning a little bit better

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig.cc: retab
Colin Patrick McCabe [Tue, 8 Mar 2011 22:59:59 +0000 (14:59 -0800)]
config.cc: retab

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agouclient: Clear the CEPH_CAP_FILE_BUFFER ref on _flush, if safe.
Greg Farnum [Tue, 8 Mar 2011 17:36:52 +0000 (09:36 -0800)]
uclient: Clear the CEPH_CAP_FILE_BUFFER ref on _flush, if safe.

Previously we just returned if safe, but leaving the CEPH_CAP_FILE_BUFFER
ref around breaks _fsync horribly. The root cause of this is
update_inode_file_bits calling objectcacher->truncate_set without
clearing the BUFFER ref, but the mechanics of clearing it there are
complicated, and I don't believe there are any issues with keeping
around the extra reference, as long as it's cleared when necessary.

This should fix #862.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agocommon_init: call to ProfilerFlush is unneeded
Colin Patrick McCabe [Tue, 8 Mar 2011 16:39:08 +0000 (08:39 -0800)]
common_init: call to ProfilerFlush is unneeded

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoReplace g_conf.name and g_conf.id with entityname
Colin Patrick McCabe [Mon, 7 Mar 2011 13:23:43 +0000 (05:23 -0800)]
Replace g_conf.name and g_conf.id with entityname

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomakefile: Add -Wno-deprecated
Colin Patrick McCabe [Tue, 8 Mar 2011 14:59:31 +0000 (06:59 -0800)]
makefile: Add -Wno-deprecated

Until we can replace gnu_cxx::hash_map with std::tr1::unordered_set,
build with -Wno-deprecated.

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

14 years agorgw: cast size_t to unsigned long to fix a 32-bit warning.
Greg Farnum [Tue, 8 Mar 2011 21:00:44 +0000 (13:00 -0800)]
rgw: cast size_t to unsigned long to fix a 32-bit warning.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrbd: cast offset values to uint64_t for unsigned comparison warning.
Greg Farnum [Tue, 8 Mar 2011 20:54:23 +0000 (12:54 -0800)]
librbd: cast offset values to uint64_t for unsigned comparison warning.

It seems that size_t, off_t, and le64 have different signed/unsigned
properties on 32 and 64-bit Linux platforms, so just cast
them both (since offsets obviously can't be negative).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge branch 'stable'
Greg Farnum [Tue, 8 Mar 2011 20:30:59 +0000 (12:30 -0800)]
Merge branch 'stable'

14 years agocommon_init: no signal handlers for library code
Colin Patrick McCabe [Mon, 7 Mar 2011 16:53:54 +0000 (08:53 -0800)]
common_init: no signal handlers for library code

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoCreate common/entity_name.h
Colin Patrick McCabe [Mon, 7 Mar 2011 12:39:47 +0000 (04:39 -0800)]
Create common/entity_name.h

Create common/entity_name.h. Refactor EntityName a bit.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd missing includes
Colin Patrick McCabe [Wed, 2 Mar 2011 18:12:38 +0000 (10:12 -0800)]
Add missing includes

Don't rely on header files being included in a certain order or
combination.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: use projected subtree in rename anchor check
Sage Weil [Tue, 8 Mar 2011 00:25:30 +0000 (16:25 -0800)]
mds: use projected subtree in rename anchor check

We want to (try to) reanchor the directory on rename when our _projected_
subtree is not a leaf.  If we use the normal get_subtree_root() call,
we get NULL if we are unlinked, which makes is_leaf_subtree() crash.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: add append to object
Yehuda Sadeh [Mon, 7 Mar 2011 21:43:28 +0000 (13:43 -0800)]
librados: add append to object

14 years agoosd: document last_epoch_clean caveat
Sage Weil [Mon, 7 Mar 2011 19:40:15 +0000 (11:40 -0800)]
osd: document last_epoch_clean caveat

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: include all stray peers in might_have_unfound
Sage Weil [Mon, 7 Mar 2011 19:32:20 +0000 (11:32 -0800)]
osd: include all stray peers in might_have_unfound

We should always consider any OSD that has a copy of the PG as a possible
location for missing objects.  There are cases where might_have_unfound is
not completed.  For example,

 - objects on [1,2]
 - 2 marked down/out
 - objects on [1,3]
 - recovery completes, last_epoch_clean is set.
 - 2 comes back online

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