]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomon: Follow the Message rules when forwarding tells
Greg Farnum [Fri, 10 Jun 2011 00:41:39 +0000 (17:41 -0700)]
mon: Follow the Message rules when forwarding tells

My initial commit was naughty, fix that up here by
creating a new message for each mon and just copying
the command.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoThread: remove globals. Thread create must succeed
Colin Patrick McCabe [Fri, 10 Jun 2011 01:26:58 +0000 (18:26 -0700)]
Thread: remove globals. Thread create must succeed

Remove the references to global variables from Thread.h. They are really
unecessary. In every case, the printout is followed by an assert which
will deliver the exact same information.

Assert that thread creation succeeds. Nobody was checking the return
value of Thread::create() previously. Added a new function,
Thread::try_create(), which programmers can use if they do want to check
the value of Thread::create() and handle it appropriately.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoLogClient: pass in CephContext explicitly
Colin Patrick McCabe [Fri, 10 Jun 2011 01:04:39 +0000 (18:04 -0700)]
LogClient: pass in CephContext explicitly

Again, the Messenger passed to LogClient may be NULL, so pass in the
CephContext explicitly.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMonitor: pass in CephContext explicitly
Colin Patrick McCabe [Fri, 10 Jun 2011 00:56:41 +0000 (17:56 -0700)]
Monitor: pass in CephContext explicitly

Sometimes we create a Monitor without a Messenger. So we can't pull the
CephContext out of the Messenger, because it may be NULL. Just specify
it explicitly in the Monitor constructor.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix up MDCache::path_is_mine to remove a totally bogus assert.
Greg Farnum [Thu, 9 Jun 2011 23:53:22 +0000 (16:53 -0700)]
mds: fix up MDCache::path_is_mine to remove a totally bogus assert.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomon: add new "tell" infrastructure.
Greg Farnum [Fri, 10 Jun 2011 00:21:33 +0000 (17:21 -0700)]
mon: add new "tell" infrastructure.

This lets you issue commands
like "ceph mon tell 0 heap start_profiler". Hurray!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoCephContext: initialize module_type in ctor
Colin Patrick McCabe [Thu, 9 Jun 2011 23:21:23 +0000 (16:21 -0700)]
CephContext: initialize module_type in ctor

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoCephContext: remove silly debug code
Colin Patrick McCabe [Thu, 9 Jun 2011 23:09:38 +0000 (16:09 -0700)]
CephContext: remove silly debug code

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoDispatcher should take a CephContext argument
Colin Patrick McCabe [Thu, 9 Jun 2011 23:08:14 +0000 (16:08 -0700)]
Dispatcher should take a CephContext argument

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix tcmalloc check.
Greg Farnum [Thu, 9 Jun 2011 22:26:13 +0000 (15:26 -0700)]
mds: fix tcmalloc check.

We can run commands to do things like start the profiler even if
it's not already running!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: xlock_finish should only do_issue in certain cases.
Greg Farnum [Mon, 6 Jun 2011 20:43:37 +0000 (13:43 -0700)]
mds: xlock_finish should only do_issue in certain cases.

We accidentally (we think) initialized this variable to true when
we want it to be false: we should only do_issue if there aren't
any remaining locks, not in all cases.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMDiscoverReply: encode/decode wanted_ino.
Greg Farnum [Thu, 9 Jun 2011 20:25:25 +0000 (13:25 -0700)]
MDiscoverReply: encode/decode wanted_ino.

This wasn't encoded previously so it was always zero on the
receiver's end, which led to nasty hangs. :(

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomdcache: correct error message.
Greg Farnum [Thu, 9 Jun 2011 00:24:22 +0000 (17:24 -0700)]
mdcache: correct error message.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: replay: save the right dir!
Greg Farnum [Wed, 8 Jun 2011 23:52:57 +0000 (16:52 -0700)]
mds: replay: save the right dir!

We were using the wrong one and breaking replay.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agodebian: move gceph into a separate package
Sage Weil [Thu, 9 Jun 2011 17:25:21 +0000 (10:25 -0700)]
debian: move gceph into a separate package

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotools/common: fix C_ObserverRefresh constructor
Colin Patrick McCabe [Thu, 9 Jun 2011 21:02:27 +0000 (14:02 -0700)]
tools/common: fix C_ObserverRefresh constructor

Fixes #1159

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agogtest: add -lpthread to AM_LDFLAGS
Colin Patrick McCabe [Thu, 9 Jun 2011 18:22:20 +0000 (11:22 -0700)]
gtest: add -lpthread to AM_LDFLAGS

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile.am: Add -lpthread to UNITTEST_LDADD
Colin Patrick McCabe [Thu, 9 Jun 2011 17:36:11 +0000 (10:36 -0700)]
Makefile.am: Add -lpthread to UNITTEST_LDADD

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoceph tools: de-globalize CephToolContext
Colin Patrick McCabe [Wed, 8 Jun 2011 22:42:46 +0000 (15:42 -0700)]
ceph tools: de-globalize CephToolContext

De-globalize CephToolContext. It's important to do this now because the
constructor for CephToolContext references the configuration (via
CephContext.)

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: drop workaround for embedded null decoding
Sage Weil [Wed, 8 Jun 2011 22:57:46 +0000 (15:57 -0700)]
mds: drop workaround for embedded null decoding

We removed the embedded null check recently, 9b37f4f, so this workaround
isn't needed.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw_admin: user info dumps auid
Yehuda Sadeh [Wed, 8 Jun 2011 21:54:14 +0000 (14:54 -0700)]
rgw_admin: user info dumps auid

14 years agorgw_admin: can reset auid
Yehuda Sadeh [Wed, 8 Jun 2011 21:13:37 +0000 (14:13 -0700)]
rgw_admin: can reset auid

14 years agoMerge remote branch 'origin/mds_rename'
Sage Weil [Wed, 8 Jun 2011 21:00:10 +0000 (14:00 -0700)]
Merge remote branch 'origin/mds_rename'

14 years agomds: rename: remove illicit assert.
Greg Farnum [Wed, 8 Jun 2011 21:13:28 +0000 (14:13 -0700)]
mds: rename: remove illicit assert.

We actually do want witnesses who aren't auth for anything
to do journaling in some cases, so kill the assert.
That also negates the need for the not_journaling check.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: try_trim_non_auth_subtree if we rename a dir away from a non-auth subtree
Sage Weil [Wed, 8 Jun 2011 20:29:21 +0000 (13:29 -0700)]
mds: try_trim_non_auth_subtree if we rename a dir away from a non-auth subtree

It's possible we have non-auth metadata only because we have a subtree
nested beneath. If we rename a directory out of a non-auth subtree, we
should try to trim any non-auth content from that subtree that may now
be possible due to the child subtrees being linked elsewhere.

Fixes: #1146
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: use CDIR_AUTH_UNDEF where possible
Sage Weil [Wed, 8 Jun 2011 20:27:34 +0000 (13:27 -0700)]
mds: use CDIR_AUTH_UNDEF where possible

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: remove unlinked metadata from cache on replay
Sage Weil [Wed, 8 Jun 2011 20:18:07 +0000 (13:18 -0700)]
mds: remove unlinked metadata from cache on replay

If we replay a metablob that unlinks something, throw it out immediately.
Recursively.  This comes up when:
 - we rename a file from one mds to another, and we replay the event on
   the source mds.  the inode gets thrown out.
 - we rename a directory from one mds to another, and when journaled, the
   source mds had no nested metadata.  same thing: we throw it out.  we
   may have something in our cache nested beneath that, though, that was
   since committed and such, but the fact that we didn't journal it being
   reattached elsewhere implies that it was clean and gone when our event
   was journaled, and we can throw it all out.  recursively.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoFix build errors in unit tests
Colin Patrick McCabe [Wed, 8 Jun 2011 19:28:23 +0000 (12:28 -0700)]
Fix build errors in unit tests

libcommon uses symbols from the crypto libraries, so they must appear on
the link line whenever libcommon appears.  Later, we may want to revisit
this dependency; however, right now, having unit tests that build
consistently is pretty important.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomonitorstore: return error codes for consistency
Colin Patrick McCabe [Fri, 27 May 2011 22:41:17 +0000 (15:41 -0700)]
monitorstore: return error codes for consistency

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoqa: test witness subtree adjustment
Sage Weil [Wed, 8 Jun 2011 18:22:26 +0000 (11:22 -0700)]
qa: test witness subtree adjustment

This exercises the mds at least; we don't have a way to verify mds
behavior currently.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoqa: test_sync_io
Sage Weil [Wed, 8 Jun 2011 05:09:24 +0000 (22:09 -0700)]
qa: test_sync_io

Currently only tests the read path for O_DIRECT and sync (if the ioctl is
in place).  Also currently crashes the kclient with

 read_direct buf_align 0 offset 4190720 len 4096

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoqa: add dir rename tests
Sage Weil [Wed, 8 Jun 2011 03:49:45 +0000 (20:49 -0700)]
qa: add dir rename tests

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: open renamed import child frags during journal replay
Sage Weil [Wed, 8 Jun 2011 03:48:52 +0000 (20:48 -0700)]
mds: open renamed import child frags during journal replay

Open up any child frags of the imported renamed inode that are noted in
the journal event.  (Note we blindly open up that list here; it's up to the
journaler to only populate it when appropriate.)  If the listed frags are
not already open, open them up and set the dir_auth to unknown; presumably
they belong to the rename source/exporter.  If we already had them open,
then the adjust_subtree_after_rename call above will have caught them and
already done the necessary subtree adjustment.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: journal open srci frags on srci import (master)
Sage Weil [Wed, 8 Jun 2011 03:46:42 +0000 (20:46 -0700)]
mds: journal open srci frags on srci import (master)

If we are importing the renamed inode, and it is a directory, journal a
list of all open dirfrags (currently, this is actually all frags) so that
we can open them up during journal replay.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: journal renames on witnesses if we have nested subtrees
Sage Weil [Wed, 8 Jun 2011 03:43:29 +0000 (20:43 -0700)]
mds: journal renames on witnesses if we have nested subtrees

If a rename witness has any subtrees that are nested beneath the renamed
directory, we need to journal the rename event so that our cache is
properly updated on journal replay.

Further, if we are exporting srci, we also need to journal the dest
(even if we aren't auth for destdn) if we have any open dirfrags because
those will turn into nested subtrees shortly.

We still need to ensure that the cache is properly trimmed during replay.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: CDir::contains() should use projected hierarchy
Sage Weil [Wed, 8 Jun 2011 03:40:39 +0000 (20:40 -0700)]
mds: CDir::contains() should use projected hierarchy

The only current callers are in resolve stage, when nothing is projected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agore-fix ignore return value change
Colin Patrick McCabe [Tue, 7 Jun 2011 23:14:26 +0000 (16:14 -0700)]
re-fix ignore return value change

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix check for no-op rename of two links to the same inode
Sage Weil [Tue, 7 Jun 2011 22:13:04 +0000 (15:13 -0700)]
mds: fix check for no-op rename of two links to the same inode

touch a
ln a b
mv a b

is a no-op, according to posix.  Move the check earlier.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocfuse: really ignore write() return value
Colin Patrick McCabe [Tue, 7 Jun 2011 21:26:58 +0000 (14:26 -0700)]
cfuse: really ignore write() return value

Hopefully this will make gcc stop complaining. The void cast no longer
seems to silence unchecked return code errors, on gitbuilder at least.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge remote branch 'origin/wip_gcov'
Josh Durgin [Tue, 7 Jun 2011 20:57:28 +0000 (13:57 -0700)]
Merge remote branch 'origin/wip_gcov'

14 years agoqa: add rename dir checks
Sage Weil [Tue, 7 Jun 2011 20:34:57 +0000 (13:34 -0700)]
qa: add rename dir checks

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocoverage: add ceph-coverage to run something with the right GCOV_PREFIX_STRIP
Josh Durgin [Tue, 7 Jun 2011 17:06:58 +0000 (10:06 -0700)]
coverage: add ceph-coverage to run something with the right GCOV_PREFIX_STRIP

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMakefile.am: add check-coverage to get coverage of 'make check'
Josh Durgin [Mon, 6 Jun 2011 18:14:17 +0000 (11:14 -0700)]
Makefile.am: add check-coverage to get coverage of 'make check'

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMakefile.am: install gcno files
Josh Durgin [Fri, 3 Jun 2011 20:33:13 +0000 (13:33 -0700)]
Makefile.am: install gcno files

This is needed so that coverage data can be generated from the
gitbuilder tarballs.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMakefile.am: clean gcno and gcda files in "make clean"
Josh Durgin [Fri, 3 Jun 2011 01:51:02 +0000 (18:51 -0700)]
Makefile.am: clean gcno and gcda files in "make clean"

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoqa: rename tests
Sage Weil [Tue, 7 Jun 2011 20:27:31 +0000 (13:27 -0700)]
qa: rename tests

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: rename: add missing pop_and_dirty_projected_inode calls
Sage Weil [Tue, 7 Jun 2011 20:21:46 +0000 (13:21 -0700)]
mds: rename: add missing pop_and_dirty_projected_inode calls

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: rename: use temp *in in _rename_apply
Sage Weil [Tue, 7 Jun 2011 20:24:35 +0000 (13:24 -0700)]
mds: rename: use temp *in in _rename_apply

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: rename: move unlink out of every possible branch
Sage Weil [Tue, 7 Jun 2011 20:24:11 +0000 (13:24 -0700)]
mds: rename: move unlink out of every possible branch

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agotest/bufferlist: add copy_all test
Colin Patrick McCabe [Tue, 7 Jun 2011 19:05:50 +0000 (12:05 -0700)]
test/bufferlist: add copy_all test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocoverage: add helper script to get coverage for a local test
Josh Durgin [Mon, 6 Jun 2011 20:52:35 +0000 (13:52 -0700)]
coverage: add helper script to get coverage for a local test

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agomon: add all_exit and exit commands
Josh Durgin [Tue, 31 May 2011 22:51:41 +0000 (15:51 -0700)]
mon: add all_exit and exit commands

all_exit makes each daemon exit(0), for gcov data collection.
exit causes cmon to do this.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agomds: allow mds to 'exit immediately'
Josh Durgin [Tue, 31 May 2011 22:48:21 +0000 (15:48 -0700)]
mds: allow mds to 'exit immediately'

This is temporary until shutting down cleans up well.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agomon: ceph tell mds * is a valid command
Josh Durgin [Tue, 31 May 2011 21:15:01 +0000 (14:15 -0700)]
mon: ceph tell mds * is a valid command

Previously this fell through and returned -EINVAL to the user.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoosd: add command to exit cleanly
Josh Durgin [Sat, 28 May 2011 00:40:28 +0000 (17:40 -0700)]
osd: add command to exit cleanly

This is required for gcov to work on daemons since the coverage data
is written atexit, and the function that writes the data is not
exported.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoconfigure: add option for building with gcov coverage support
Josh Durgin [Sat, 28 May 2011 00:37:43 +0000 (17:37 -0700)]
configure: add option for building with gcov coverage support

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agotest/bufferlist.cc: retab for consistency
Colin Patrick McCabe [Tue, 7 Jun 2011 18:58:06 +0000 (11:58 -0700)]
test/bufferlist.cc: retab for consistency

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocfuse.cc: fix warning
Colin Patrick McCabe [Tue, 7 Jun 2011 18:56:05 +0000 (11:56 -0700)]
cfuse.cc: fix warning

We genuinely don't care about the return code we get back from this call
to write(2). So cast the result to void to tell gcc that we don't care.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agobufferlist::iterator: add copy_all, use in KeyRing
Colin Patrick McCabe [Tue, 7 Jun 2011 18:40:48 +0000 (11:40 -0700)]
bufferlist::iterator: add copy_all, use in KeyRing

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: rename: fix oldin pop
Sage Weil [Tue, 7 Jun 2011 18:25:39 +0000 (11:25 -0700)]
mds: rename: fix oldin pop

- make the pop match position with the project in prepare
- don't pop on linkmerge, since we don't project in that case

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: rename: some cleanup
Sage Weil [Tue, 7 Jun 2011 18:24:50 +0000 (11:24 -0700)]
mds: rename: some cleanup

- add oldin temp
- make if conditions match between _prepare and _apply

no functional changes.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix rename request target selection
Sage Weil [Tue, 7 Jun 2011 18:23:54 +0000 (11:23 -0700)]
client: fix rename request target selection

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix mds selection for unlink
Sage Weil [Tue, 7 Jun 2011 18:11:07 +0000 (11:11 -0700)]
client: fix mds selection for unlink

It was broken when a remote link target was on another mds.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: make debug prints for choose_target_mds more helpful
Sage Weil [Tue, 7 Jun 2011 18:08:02 +0000 (11:08 -0700)]
client: make debug prints for choose_target_mds more helpful

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: allow caps to be dropped on another inode for requests
Sage Weil [Tue, 7 Jun 2011 18:07:44 +0000 (11:07 -0700)]
client: allow caps to be dropped on another inode for requests

We need the ability to drop caps on another inode that isn't req->inode
or req->old_inode in the request struct.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix unlink new snaprealm check
Sage Weil [Tue, 7 Jun 2011 17:59:09 +0000 (10:59 -0700)]
mds: fix unlink new snaprealm check

The bool was flipped.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix rename debug print
Sage Weil [Tue, 7 Jun 2011 17:50:50 +0000 (10:50 -0700)]
client: fix rename debug print

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agog_conf: change to pointer
Colin Patrick McCabe [Tue, 7 Jun 2011 17:38:54 +0000 (10:38 -0700)]
g_conf: change to pointer

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agosimple_spin: fix compiler warnings
Colin Patrick McCabe [Tue, 7 Jun 2011 17:23:45 +0000 (10:23 -0700)]
simple_spin: fix compiler warnings

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinit: set cct->module_type in common_preinit
Colin Patrick McCabe [Tue, 7 Jun 2011 17:17:40 +0000 (10:17 -0700)]
init: set cct->module_type in common_preinit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: rename: fix handling of target that is remote dentry
Sage Weil [Tue, 7 Jun 2011 17:04:09 +0000 (10:04 -0700)]
mds: rename: fix handling of target that is remote dentry

If the target is a remote dentry, we need to consider that the destdn
and desti may have different auths.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix mds routing for link requests
Sage Weil [Tue, 7 Jun 2011 16:58:29 +0000 (09:58 -0700)]
client: fix mds routing for link requests

We want to send link requests to the auth for the new name, not the
target inode.  We also want to drop FILE_SHARED caps on new name's
directory.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: rename: only add target to stray if destdn is a primary
Sage Weil [Tue, 7 Jun 2011 16:49:04 +0000 (09:49 -0700)]
mds: rename: only add target to stray if destdn is a primary

Only add target into the stray dir if we are renaming over a primary
dentry.  (Otherwise we aren't moving the target.)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix/clean up xlock import/export
Sage Weil [Tue, 7 Jun 2011 16:41:56 +0000 (09:41 -0700)]
mds: fix/clean up xlock import/export

- create xlock import/export helpers
- fix/simplify checks: we want to export/import only xlocks on the inode
that is being migrated, unless they are locallock.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agogitbuilder: quiet
Yehuda Sadeh [Mon, 6 Jun 2011 22:16:40 +0000 (15:16 -0700)]
gitbuilder: quiet

14 years agoradosgw_admin: link bucket to user
Yehuda Sadeh [Mon, 6 Jun 2011 21:22:49 +0000 (14:22 -0700)]
radosgw_admin: link bucket to user

14 years agomds: adjust subtree roots on rename
Sage Weil [Mon, 6 Jun 2011 20:30:25 +0000 (13:30 -0700)]
mds: adjust subtree roots on rename

If we replay a dir rename operation, we need to adjust the subtree map
accordingly.

This covers the case where the metablob contains both the src and dest
dentries.  Remaining cases will follow.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocommon: add module_type to CephContext; use to initialize rotating keys
Sage Weil [Mon, 6 Jun 2011 20:06:41 +0000 (13:06 -0700)]
common: add module_type to CephContext; use to initialize rotating keys

This fixes rotating keys.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/wip_librbd_locking'
Sage Weil [Mon, 6 Jun 2011 17:58:32 +0000 (10:58 -0700)]
Merge remote branch 'origin/wip_librbd_locking'

14 years agomonclient: use default mon port if not specified in conf
Sage Weil [Mon, 6 Jun 2011 16:25:12 +0000 (09:25 -0700)]
monclient: use default mon port if not specified in conf

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomonmaptool: use default mon port if not specified
Sage Weil [Mon, 6 Jun 2011 16:25:00 +0000 (09:25 -0700)]
monmaptool: use default mon port if not specified

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodumpjnl: call msgr->register_entity before start
Colin Patrick McCabe [Sat, 4 Jun 2011 01:45:22 +0000 (18:45 -0700)]
dumpjnl: call msgr->register_entity before start

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agosimple_spin: use file-scope global not function
Colin Patrick McCabe [Sat, 4 Jun 2011 01:15:11 +0000 (18:15 -0700)]
simple_spin: use file-scope global not function

function-scoped globals are protected by a mutex, and taking a mutex
inside a spin lock implementation kind of defeats the point...

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agosimple_spin: fix linker error
Sage Weil [Fri, 3 Jun 2011 23:36:13 +0000 (16:36 -0700)]
simple_spin: fix linker error

For some stupid reason the linker is pulling this in twice, resulting in

/bin/sh ../libtool --tag=CXX   --mode=link g++  -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -Wnon-virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel  -g -Wextra -Wno-missing-field-initializers -Wno-missing-declarations -Wno-unused-parameter -Wl,--as-needed -latomic_ops  -o radosgw_admin radosgw_admin-rgw_fs.o radosgw_admin-rgw_rados.o radosgw_admin-rgw_user.o radosgw_admin-rgw_access.o radosgw_admin-rgw_op.o radosgw_admin-rgw_rest.o radosgw_admin-rgw_rest_os.o radosgw_admin-rgw_rest_s3.o radosgw_admin-rgw_common.o radosgw_admin-rgw_cache.o radosgw_admin-rgw_os.o radosgw_admin-rgw_os_auth.o radosgw_admin-rgw_formats.o radosgw_admin-rgw_log.o rgw_escape.o radosgw_admin-rgw_admin.o librgw.a librados.a -lfcgi -lcurl -lexpat -lpthread -lm -lcrypto++
libcommon.a(libcommon_a-simple_spin.o):(.data+0x8): multiple definition of `foo'
test_trans.o:/home/sage/ceph/src/./common/debug.h:51: first defined here

...which points to some larger linking issue.  However, this fixes it for
now.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofix the MonClient problems for --with-debug programs.
Greg Farnum [Sat, 4 Jun 2011 00:13:47 +0000 (17:13 -0700)]
fix the MonClient problems for --with-debug programs.
Still doesn't compile, though.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoRefactor MonClient, KeyRing
Colin Patrick McCabe [Thu, 2 Jun 2011 22:50:22 +0000 (15:50 -0700)]
Refactor MonClient, KeyRing

MonClient should contain a KeyRing and a RotatingKeyRing. All the
MonClient users, except possibly csyn, don't want to manage those
objects themselves.

Don't chdir until after we have opened the KeyRing. If the KeyRing is at
a relative path, a chdir may make it inaccessible. Separate the chdir
function from the daemonize function.

Refactor the cmds argument parsing a little bit. Separate the special
actions from the normal operations of the daemon.

This should allow librados and libceph to support CephX finally! yay!

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoremove g_keyring
Colin Patrick McCabe [Wed, 1 Jun 2011 21:17:55 +0000 (14:17 -0700)]
remove g_keyring

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodout:remove stream from dout_emerg_streams earlier
Colin Patrick McCabe [Wed, 1 Jun 2011 18:52:31 +0000 (11:52 -0700)]
dout:remove stream from dout_emerg_streams earlier

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoDoutStreambuf: de-globalize dout lock
Colin Patrick McCabe [Wed, 1 Jun 2011 18:13:45 +0000 (11:13 -0700)]
DoutStreambuf: de-globalize dout lock

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoDoutStreambuf: de-globalize emergency logging
Colin Patrick McCabe [Wed, 1 Jun 2011 17:08:19 +0000 (10:08 -0700)]
DoutStreambuf: de-globalize emergency logging

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd simple_spin
Colin Patrick McCabe [Wed, 1 Jun 2011 16:35:30 +0000 (09:35 -0700)]
Add simple_spin

Add simple spinlock implementation that is safe to use from anywhere.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoRevert "cfuse.cc: use safe_write"
Greg Farnum [Fri, 3 Jun 2011 21:29:35 +0000 (14:29 -0700)]
Revert "cfuse.cc: use safe_write"

This reverts commit e8ac5aa2a4c4e3ce84ed553dbebfb1cccf5679a9.

This commit is just erroneous. It adds checks on a pipe write
for the result and an abort if the write failed. But that's broken
in the desired case where we succeed, block on ceph_fuse_ll_main(),
and the parent process is long-gone by the time we get to this code!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorados_bencher: re-add written objects constraint to read benchmark.
Greg Farnum [Fri, 3 Jun 2011 18:53:10 +0000 (11:53 -0700)]
rados_bencher: re-add written objects constraint to read benchmark.

Somehow, in the last major change, the constraints that kept the
bencher from trying to read non-existent objects got removed. Put
a check back in the main bench loop to fix that.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: remove now-erroneous comment
Greg Farnum [Fri, 3 Jun 2011 17:49:44 +0000 (10:49 -0700)]
mds: remove now-erroneous comment

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge branch 'next'
Greg Farnum [Fri, 3 Jun 2011 17:02:32 +0000 (10:02 -0700)]
Merge branch 'next'

Conflicts:
src/mds/Server.cc

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Clean up _rename_prepare journaling
Greg Farnum [Fri, 3 Jun 2011 16:53:20 +0000 (09:53 -0700)]
mds: Clean up _rename_prepare journaling

This has been broken for a while in terms of journaling
things the MDS isn't auth for. This patch should fix that, and
adds a few asserts to that effect.

Also adds a new not_journaling flag to _rename_prepare
for those cases which call the function and then discard
the bufferlist results.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: _rename_prepaer should only journal dest if auth for it
Greg Farnum [Fri, 3 Jun 2011 16:46:48 +0000 (09:46 -0700)]
mds: _rename_prepaer should only journal dest if auth for it

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: reset flushing_caps on (mds) cap import.
Greg Farnum [Thu, 2 Jun 2011 21:27:23 +0000 (14:27 -0700)]
uclient: reset flushing_caps on (mds) cap import.

Previously, we could get stuck thinking that we'd flushed caps
(that went to the original MDS, waited on freeze for export,
and then were dropped) without ever telling the auth MDS that we
wanted to do so. This caused hung shutdowns:
1) during shutdown we drop all our caps
2) we get stuck and notice that we have a flushing cap
3) we send cap flush
4) MDS ignores it (I think because actual data already got updated?
and now we don't have the proper caps either)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: don't use racy check for uncommitted data.
Greg Farnum [Thu, 2 Jun 2011 18:43:05 +0000 (11:43 -0700)]
uclient: don't use racy check for uncommitted data.

Previously we used a check for if there were CEPH_CAP_FILE_BUFFER refs,
but that was racy if we had other threads (they could hold caps for
sync writes or something). Instead, see if we have any in-flight
writes or uncommitted objects.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: call the right function pointer on truncate
Greg Farnum [Wed, 1 Jun 2011 21:46:15 +0000 (14:46 -0700)]
uclient: call the right function pointer on truncate

fixes 67533e14439e9b to do what it meant to.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>