]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoperf counters: add back inc type for collectd
Colin Patrick McCabe [Tue, 26 Jul 2011 23:27:34 +0000 (16:27 -0700)]
perf counters: add back inc type for collectd

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient/Client.cc: remove superfluous check
Colin Patrick McCabe [Tue, 26 Jul 2011 22:48:11 +0000 (15:48 -0700)]
client/Client.cc: remove superfluous check

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: get object with range should return 206
Yehuda Sadeh [Tue, 26 Jul 2011 22:48:19 +0000 (15:48 -0700)]
rgw: get object with range should return 206

14 years agorgw: fix bad initialization
Yehuda Sadeh [Tue, 26 Jul 2011 21:54:01 +0000 (14:54 -0700)]
rgw: fix bad initialization

14 years agorgw: fix warning
Yehuda Sadeh [Tue, 26 Jul 2011 21:53:50 +0000 (14:53 -0700)]
rgw: fix warning

14 years agoMakefile: sysconfdir for bash_completion install
Sage Weil [Tue, 26 Jul 2011 21:59:43 +0000 (14:59 -0700)]
Makefile: sysconfdir for bash_completion install

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: return error on partial object put
Yehuda Sadeh [Tue, 26 Jul 2011 21:34:09 +0000 (14:34 -0700)]
rgw: return error on partial object put

14 years agorgw: modify print macro to log using default log api
Yehuda Sadeh [Tue, 26 Jul 2011 21:27:36 +0000 (14:27 -0700)]
rgw: modify print macro to log using default log api

so that different output fds being used are the same and the log
would actually make sense

14 years agobash_completion: no more injectargs command
Sage Weil [Tue, 26 Jul 2011 21:17:08 +0000 (14:17 -0700)]
bash_completion: no more injectargs command

Use 'ceph [osd|mds|mon] tell injectargs "foo bar"'.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMakefile: add bash_completion
Wido den Hollander [Tue, 26 Jul 2011 21:03:34 +0000 (14:03 -0700)]
Makefile: add bash_completion

Signed-off-by: Wido den Hollander <wido@widodh.nl>
14 years agobash_completion: Add the bash_completion files to the Debian packages
Wido den Hollander [Tue, 28 Jun 2011 18:28:13 +0000 (20:28 +0200)]
bash_completion: Add the bash_completion files to the Debian packages

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agobash_completion: Add bash completion for ceph, rados, radosgw_admin and rbd
Wido den Hollander [Tue, 28 Jun 2011 18:28:12 +0000 (20:28 +0200)]
bash_completion: Add bash completion for ceph, rados, radosgw_admin and rbd

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoAdd ObsyncException
Colin Patrick McCabe [Tue, 26 Jul 2011 18:29:53 +0000 (11:29 -0700)]
Add ObsyncException

This class has subclasses representing temporary and permanent
exceptions, as well as argument parsing errors. An instance of this
class can be created from a message or from another exception.

We always print out the type of exception on the last line of stderr,
right after the exception information.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: return Bad Request on PUT requests with empty content length
Yehuda Sadeh [Tue, 26 Jul 2011 19:23:36 +0000 (12:23 -0700)]
rgw: return Bad Request on PUT requests with empty content length

14 years agorgw: fix error code returned for bad digest
Yehuda Sadeh [Tue, 26 Jul 2011 18:57:07 +0000 (11:57 -0700)]
rgw: fix error code returned for bad digest

14 years agoadmin socket: handle schema request
Colin Patrick McCabe [Mon, 25 Jul 2011 23:31:59 +0000 (16:31 -0700)]
admin socket: handle schema request

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoadmin_socket: change request 0 to get version
Colin Patrick McCabe [Mon, 25 Jul 2011 19:53:52 +0000 (12:53 -0700)]
admin_socket: change request 0 to get version

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agouse glibc d_type macros, helpers
Sage Weil [Mon, 25 Jul 2011 17:08:45 +0000 (10:08 -0700)]
use glibc d_type macros, helpers

Fixes: #1135
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoperfcounters: no more stat/ dir, yay!
Sage Weil [Mon, 25 Jul 2011 16:14:08 +0000 (09:14 -0700)]
perfcounters: no more stat/ dir, yay!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: be careful about calls to try_subtree_merge
Sage Weil [Mon, 25 Jul 2011 05:08:13 +0000 (22:08 -0700)]
mds: be careful about calls to try_subtree_merge

try_subtree_merge will, on occasion, journal something.  And anytime we
journal something we may open a new segment and journal an ESubtreeMap.
That means we subtree state needs to be consistent with any in-progress
or finishing migrations.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix subtree_map simplify, again
Sage Weil [Mon, 25 Jul 2011 05:06:16 +0000 (22:06 -0700)]
mds: fix subtree_map simplify, again

Erasing from the vector<> seems to be clobbering the iterator, even when it
preceeds the deletion point.  Use integer index instead. Yuck!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: journal EImportFinish after updating subtree/import state
Sage Weil [Sun, 24 Jul 2011 22:46:57 +0000 (15:46 -0700)]
mds: journal EImportFinish after updating subtree/import state

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: journal copious ESubtreeMaps if mds_debug_subtrees
Sage Weil [Sun, 24 Jul 2011 22:40:14 +0000 (15:40 -0700)]
mds: journal copious ESubtreeMaps if mds_debug_subtrees

Journal a new subtree map after every event if subtree debugging is
enabled.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix stl iterator misuse in create_subtree_map
Sage Weil [Sun, 24 Jul 2011 22:30:33 +0000 (15:30 -0700)]
mds: fix stl iterator misuse in create_subtree_map

q might be the first element, so we can't blindly --q; ++q.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoperfcounters: remove stray #includes
Sage Weil [Sun, 24 Jul 2011 22:29:20 +0000 (15:29 -0700)]
perfcounters: remove stray #includes

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoadmin_socket: fix EINTR check
Sage Weil [Sun, 24 Jul 2011 22:04:25 +0000 (15:04 -0700)]
admin_socket: fix EINTR check

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoadmin_socket: fix busy loop
Sage Weil [Sun, 24 Jul 2011 22:04:09 +0000 (15:04 -0700)]
admin_socket: fix busy loop

Passing timeout==0 will return immediately.  Pass -1 to block until
interesting happens.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: kill useless MDLog::writing_subtree_map
Sage Weil [Sun, 24 Jul 2011 21:45:38 +0000 (14:45 -0700)]
mds: kill useless MDLog::writing_subtree_map

No reason we can't have multiple maps in flight to the journal.  This looks
like baggage from when subtree_map_expire_waiters was used.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: submit_entry last
Sage Weil [Sun, 24 Jul 2011 21:22:12 +0000 (14:22 -0700)]
mds: submit_entry last

MDLog::submit_entry() may journal an ESubtreeMap as a side-effect, so make
sure we have updated our state correctly _before_ calling it.  The safest
is to just do it last.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: simplify 'mon tell ...'
Sage Weil [Sun, 24 Jul 2011 21:02:36 +0000 (14:02 -0700)]
mon: simplify 'mon tell ...'

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: rip out injectargs command(s)
Sage Weil [Sun, 24 Jul 2011 05:13:14 +0000 (22:13 -0700)]
mon: rip out injectargs command(s)

Use 'ceph [osd|mds|mon] tell <who> injectargs ...'

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix OSDOp printer for CLONERANGE
Sage Weil [Sat, 23 Jul 2011 20:32:45 +0000 (13:32 -0700)]
osd: fix OSDOp printer for CLONERANGE

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: 'dump [--format=json]'
Sage Weil [Fri, 22 Jul 2011 23:25:14 +0000 (16:25 -0700)]
mon: 'dump [--format=json]'

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoauth: fix compile error when using nss libs
Marcus Sorensen [Fri, 22 Jul 2011 20:16:58 +0000 (13:16 -0700)]
auth: fix compile error when using nss libs

auth/Crypto.cc:218: error: expected primary-expression before ?}? token
auth/Crypto.cc:218: error: expected ?;? before ?}? token

Signed-off-by: Marcus Sorensen <shadowsor@gmail.com>
14 years agomds: remove broken delay of cap releases from a replica.
Greg Farnum [Fri, 22 Jul 2011 21:00:55 +0000 (14:00 -0700)]
mds: remove broken delay of cap releases from a replica.

This hasn't worked in a very long time and serves little purpose
since the clients will have their own cap delay releases.
Nix a few of the repeated asserts while we're at it.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoRevert "mds: Only change in->replica_caps_wanted when actually messaging"
Greg Farnum [Fri, 22 Jul 2011 20:50:25 +0000 (13:50 -0700)]
Revert "mds: Only change in->replica_caps_wanted when actually messaging"

This reverts commit a2c761e62acdb3cff941867c224ae295cf6337b3. We actually
want to change this whenever we try to send a message, and we do want
to send messages during state REJOIN (the auth MDS will take the message if it's
appropriate to do so; otherwise it drops the message because the information
it contains is going to arrive anyway when we tell the MDS our entire
replicated state as part of its rejoin). Instead, we're going to fix when we
send messages so that it's not broken.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: reorder timing checks in request_inode_file_caps
Greg Farnum [Fri, 22 Jul 2011 18:45:03 +0000 (11:45 -0700)]
mds: reorder timing checks in request_inode_file_caps

We do want to hold onto caps for a few seconds after the client
closes it, just in case it decides to re-open again! With the
old arrangement the keep time was never moved off of zero.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Only change in->replica_caps_wanted when actually messaging
Greg Farnum [Fri, 22 Jul 2011 18:33:16 +0000 (11:33 -0700)]
mds: Only change in->replica_caps_wanted when actually messaging

Also, only send the message if the auth is past the REJOIN state.
The auth will just drop it if it gets this request while in rejoin.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: fix keep caps test.
Greg Farnum [Fri, 22 Jul 2011 18:29:18 +0000 (11:29 -0700)]
mds: fix keep caps test.

I think this has just been broken since it was written: previously it
dropped the caps if the keep time was after current time. Since the
keep time was never set to non-zero except after failing this test,
and only changed once, if you didn't come into this function again
within the 2-second window then you would never drop the caps.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: rename cache expire variables for clarity
Greg Farnum [Fri, 22 Jul 2011 17:30:18 +0000 (10:30 -0700)]
mds: rename cache expire variables for clarity

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoupdate documentation on cache expires during exports
Greg Farnum [Thu, 21 Jul 2011 22:27:24 +0000 (15:27 -0700)]
update documentation on cache expires during exports

Add an assert to check conditions.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomon: 'pg dump [--format=json] [all|sum|pools|pgs|osds]'
Sage Weil [Fri, 22 Jul 2011 17:46:46 +0000 (10:46 -0700)]
mon: 'pg dump [--format=json] [all|sum|pools|pgs|osds]'

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: async pool creation
Yehuda Sadeh [Thu, 21 Jul 2011 21:45:04 +0000 (14:45 -0700)]
librados: async pool creation

14 years agoceph: understand -- argument
Sage Weil [Thu, 21 Jul 2011 23:42:53 +0000 (16:42 -0700)]
ceph: understand -- argument

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: cleanup-let: use is_leased() for lease revocation checks
Sage Weil [Fri, 22 Jul 2011 15:51:04 +0000 (08:51 -0700)]
mds: cleanup-let: use is_leased() for lease revocation checks

And add const-ness.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: revoke client leases on replica dn lock
Sage Weil [Fri, 22 Jul 2011 15:50:45 +0000 (08:50 -0700)]
mds: revoke client leases on replica dn lock

If a replica dentry gets a LOCK message, revoke client leases.  Don't just
wait for them to expire!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix ambiguous check when journaling subtree map
Sage Weil [Fri, 22 Jul 2011 15:41:18 +0000 (08:41 -0700)]
mds: fix ambiguous check when journaling subtree map

We journal the EImportStart--and become ambiguous--when we set the state
to IMPORT_LOGGINGSTART; the subtree auth becomes ambiguous a few stages
before that.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix stalls on racing revocations can cap migrations
Sage Weil [Fri, 22 Jul 2011 15:19:30 +0000 (08:19 -0700)]
client: fix stalls on racing revocations can cap migrations

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosdmaptool: fix clitest
Sage Weil [Thu, 21 Jul 2011 21:28:08 +0000 (14:28 -0700)]
osdmaptool: fix clitest

flags now unconditionally followed by space.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoformatter: escape quoted strings
Sage Weil [Thu, 21 Jul 2011 20:46:06 +0000 (13:46 -0700)]
formatter: escape quoted strings

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: rewrite pgmap json dump using Formatter
Sage Weil [Thu, 21 Jul 2011 20:33:20 +0000 (13:33 -0700)]
mon: rewrite pgmap json dump using Formatter

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoformatter: dump float, simplify pending_string stuff
Sage Weil [Thu, 21 Jul 2011 20:33:09 +0000 (13:33 -0700)]
formatter: dump float, simplify pending_string stuff

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: dump osdmap in json
Sage Weil [Thu, 21 Jul 2011 19:54:15 +0000 (12:54 -0700)]
osd: dump osdmap in json

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: add Formatter class
Sage Weil [Thu, 21 Jul 2011 19:54:00 +0000 (12:54 -0700)]
common: add Formatter class

This is based on the RGW class, but

 - uses a stringstream
 - has an additional dump_stream() method that gives you a usable ostream
 - handles object keys properly

We should merge these implementations.

Not sure if either a stringstream or the raw buffer in the rgw class is
ideal.  Probably output should accumulate on a bufferlist so we can avoid
ever reallocating for big dumps.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoadmin_socket srv:set F_CLOEXEC on listening socket
Colin Patrick McCabe [Thu, 21 Jul 2011 20:15:08 +0000 (13:15 -0700)]
admin_socket srv:set F_CLOEXEC on listening socket

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoadmin_socket: fix uninitialized accept() param
Colin Patrick McCabe [Thu, 21 Jul 2011 20:10:39 +0000 (13:10 -0700)]
admin_socket: fix uninitialized accept() param

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoadmin_socket.cc: Use older sizeof syntax
Colin Patrick McCabe [Thu, 21 Jul 2011 19:31:04 +0000 (12:31 -0700)]
admin_socket.cc: Use older sizeof syntax

Fix compilation for compilers that don't support the
sizeof(type::field_name) syntax.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: socket path includes full socket name
Yehuda Sadeh [Thu, 21 Jul 2011 19:19:09 +0000 (12:19 -0700)]
rgw: socket path includes full socket name

14 years agoperfcounters: don't output trailing commas in JSON
Colin Patrick McCabe [Thu, 21 Jul 2011 18:05:47 +0000 (11:05 -0700)]
perfcounters: don't output trailing commas in JSON

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd line break after add_key() failure message.
Alexandre Oliva [Thu, 21 Jul 2011 08:28:26 +0000 (05:28 -0300)]
Add line break after add_key() failure message.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: more CInode un-inlining
Sage Weil [Wed, 20 Jul 2011 22:58:33 +0000 (15:58 -0700)]
mds: more CInode un-inlining

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: uninline a few things
Sage Weil [Wed, 20 Jul 2011 22:54:33 +0000 (15:54 -0700)]
mds: uninline a few things

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest/perf_counters: more renaming
Colin Patrick McCabe [Wed, 20 Jul 2011 23:43:07 +0000 (16:43 -0700)]
test/perf_counters: more renaming

* more renaming

* common/admin_socket_client.cc: use old-fashioned sizeof construct in
case some compilers can't handler newer syntax

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoceph_context: remove set_module_type
Colin Patrick McCabe [Wed, 20 Jul 2011 23:38:12 +0000 (16:38 -0700)]
ceph_context: remove set_module_type

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'wip-proflogger'
Colin Patrick McCabe [Wed, 20 Jul 2011 23:26:18 +0000 (16:26 -0700)]
Merge branch 'wip-proflogger'

Conflicts:
src/common/config.cc
src/common/config.h

14 years agoClient.cc: rename client_logger -> client_counters
Colin Patrick McCabe [Wed, 20 Jul 2011 23:23:35 +0000 (16:23 -0700)]
Client.cc: rename client_logger -> client_counters

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoRename ProfLogger to Perfcounters: part 2
Colin Patrick McCabe [Wed, 20 Jul 2011 23:18:23 +0000 (16:18 -0700)]
Rename ProfLogger to Perfcounters: part 2

Part 2: class names, variable names

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoJournaler: weaken a few asserts to let it pass errors back up.
Greg Farnum [Wed, 20 Jul 2011 22:55:51 +0000 (15:55 -0700)]
Journaler: weaken a few asserts to let it pass errors back up.

Adjust MDLog to handle the possibility of errors appearing.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoC_Gather: fix comment.
Greg Farnum [Wed, 20 Jul 2011 21:30:27 +0000 (14:30 -0700)]
C_Gather: fix comment.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoJournaler: return errors from probing back to callers.
Greg Farnum [Wed, 20 Jul 2011 21:30:16 +0000 (14:30 -0700)]
Journaler: return errors from probing back to callers.

Adjust Dumper to handle the error codes. The other callers already do
so!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: handle EBLACKLISTED in MDCache::do_file_recover; assert on errors
Greg Farnum [Wed, 20 Jul 2011 21:17:17 +0000 (14:17 -0700)]
mds: handle EBLACKLISTED in MDCache::do_file_recover; assert on errors

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoFiler: return error codes from probing up to the calling layer.
Greg Farnum [Wed, 20 Jul 2011 21:16:56 +0000 (14:16 -0700)]
Filer: return error codes from probing up to the calling layer.

This is pretty limited; if you get multiple errors in one batch
of probes it'll only return the last one to get sent back (ENOENT is
excluded). But it's better than nothing.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoRename ProfLogger to PerfCounters
Colin Patrick McCabe [Wed, 20 Jul 2011 22:58:13 +0000 (15:58 -0700)]
Rename ProfLogger to PerfCounters

Part 1: file names

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agore-enable proflogger test
Colin Patrick McCabe [Wed, 20 Jul 2011 22:47:45 +0000 (15:47 -0700)]
re-enable proflogger test

Re-enable the proflogger test. This time, it doesn't test the basic
socket functionality (that is what test/admin_socket.cc is for).

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: dump is_truncated when listing bucket
Yehuda Sadeh [Wed, 20 Jul 2011 20:24:25 +0000 (13:24 -0700)]
rgw: dump is_truncated when listing bucket

14 years agotest/admin_socket: test message 0
Colin Patrick McCabe [Wed, 20 Jul 2011 22:33:23 +0000 (15:33 -0700)]
test/admin_socket: test message 0

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMove ProfLogger socket code into admin_socket
Colin Patrick McCabe [Wed, 20 Jul 2011 18:27:17 +0000 (11:27 -0700)]
Move ProfLogger socket code into admin_socket

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: cinode: Add a little debugging and fix an output
Greg Farnum [Wed, 20 Jul 2011 20:15:33 +0000 (13:15 -0700)]
mds: cinode: Add a little debugging and fix an output

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Drop locks and auth pins when waiting for freezingtree
Greg Farnum [Wed, 20 Jul 2011 20:15:13 +0000 (13:15 -0700)]
mds: Drop locks and auth pins when waiting for freezingtree

In most cases we don't end up in this branch because there's an escape
if you already have an auth_pin on the ref in question. But when
you've got snapshots going on, you can process the request, block on
a lock state change, commit a snapshot change to the inode, and then
try to process the request again. On this second attempt, though,
you end up with a different ref which you don't have a pin on.
Deadlock and breakage ensues!
To fix, drop all locks and auth pins when you wait -- either
you don't have any to drop anyway, or you've got them on a previous
version of the inode that isn't useful anymore.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: correctly initialize mseq in flush_snaps.
Greg Farnum [Wed, 20 Jul 2011 17:02:01 +0000 (10:02 -0700)]
uclient: correctly initialize mseq in flush_snaps.

Previously we set mseq=0 unconditionally; this was a mistake that
creeped in via bitrot. Instead, set mseq from the auth cap.
This bug meant that any inodes which had gotten migrated between
MDSes would have their flush_snap messages dropped by the MDS.
Resolves #1324.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: mark rmdir with slaves as a master in journal
Sage Weil [Wed, 20 Jul 2011 20:17:23 +0000 (13:17 -0700)]
mds: mark rmdir with slaves as a master in journal

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix rmdir slave commit, rollback
Sage Weil [Wed, 20 Jul 2011 20:06:01 +0000 (13:06 -0700)]
mds: fix rmdir slave commit, rollback

We need to set the slave commit callback to journal a commit or rollback
as needed.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: simplify journaled subtree_map
Sage Weil [Wed, 20 Jul 2011 19:46:19 +0000 (12:46 -0700)]
mds: simplify journaled subtree_map

We may have subtrees split locally due to migrations that are just getting
started or stopped.  Simplify the map we journal to disk.  Among other
things this makes the replay check simple (it can compare against the
current "live" map).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: add mds_debug_subtrees option
Sage Weil [Wed, 20 Jul 2011 18:08:56 +0000 (11:08 -0700)]
mds: add mds_debug_subtrees option

Verify that replayed ESubtreeMap events match what we have.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set LogEvent _start_off, drop unused _end_off
Sage Weil [Wed, 20 Jul 2011 17:35:39 +0000 (10:35 -0700)]
mds: set LogEvent _start_off, drop unused _end_off

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: witness rmdir when subtrees are on other hosts
Sage Weil [Fri, 15 Jul 2011 23:36:07 +0000 (16:36 -0700)]
mds: witness rmdir when subtrees are on other hosts

If there is an rmdir with an empty subtree on another mds, we need to witness/
journal that on the dirfrag's auth mds so that replay correctly updates the
subtree map.

This is simpler than the rename witnesses (and the link/unlink ones) because
we aren't actually journaling a modification to any actual metadata; it's just
the subtree map that is changing.

The projection of the subtree map update needs work still, but that is also the
case for renames.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'wip-rgw-multithreaded'
Yehuda Sadeh [Wed, 20 Jul 2011 17:35:55 +0000 (10:35 -0700)]
Merge branch 'wip-rgw-multithreaded'

14 years agorgw: setup as external server is configurable
Yehuda Sadeh [Wed, 20 Jul 2011 17:35:06 +0000 (10:35 -0700)]
rgw: setup as external server is configurable

14 years agorgw: clearer logging context
Yehuda Sadeh [Wed, 20 Jul 2011 17:01:17 +0000 (10:01 -0700)]
rgw: clearer logging context

14 years agoconfig.cc: fix comments
Colin Patrick McCabe [Wed, 20 Jul 2011 16:31:31 +0000 (09:31 -0700)]
config.cc: fix comments

Fix comments that were reverted to an older version by commit
a51b983a8bbafc455bcd2acd993981ece00abcc7.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoPGMonitor.cc: add force_create_pg command to monitor
Samuel Just [Wed, 20 Jul 2011 00:28:45 +0000 (17:28 -0700)]
PGMonitor.cc: add force_create_pg command to monitor

ceph pg force_create_pg <pgid> will now reset that pg's status to
creating to handle corner cases where no osd has that pg.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agorgw: fix concurrency issue
Yehuda Sadeh [Tue, 19 Jul 2011 21:02:11 +0000 (14:02 -0700)]
rgw: fix concurrency issue

14 years agoProfLogger: add request codes
Colin Patrick McCabe [Tue, 19 Jul 2011 19:05:25 +0000 (12:05 -0700)]
ProfLogger: add request codes

The client now starts by sending a 4-byte request code.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoProfLogger: use double quotes, add commas
Colin Patrick McCabe [Tue, 19 Jul 2011 18:48:21 +0000 (11:48 -0700)]
ProfLogger: use double quotes, add commas

Technically, JSON always uses double quotes, even though Javascript
often uses single quotes for strings. Also add a comma that had been
omitted.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Tue, 19 Jul 2011 18:26:25 +0000 (11:26 -0700)]
Merge branch 'stable'

14 years agomds: clean up file flags to file mode translation
Sage Weil [Tue, 19 Jul 2011 18:25:46 +0000 (11:25 -0700)]
mds: clean up file flags to file mode translation

There was some seriously wrong and ancient cruft in there.  open(2)
specifies that one of O_RDONLY, O_WRONLY, and O_RDWR must always be
specified.  Drop all the crazy.

Linux VFS interprets O_WRONLY|O_RDWR as read+write, so we'll do the same.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoProfLogger: enable by default for daemons
Colin Patrick McCabe [Tue, 19 Jul 2011 18:08:34 +0000 (11:08 -0700)]
ProfLogger: enable by default for daemons

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoPut each ProfLogger's data into its own object
Colin Patrick McCabe [Tue, 19 Jul 2011 18:04:45 +0000 (11:04 -0700)]
Put each ProfLogger's data into its own object

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient: check for invalid file mode
Sage Weil [Tue, 19 Jul 2011 17:38:40 +0000 (10:38 -0700)]
client: check for invalid file mode

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: check for invalid file mode
Sage Weil [Tue, 19 Jul 2011 17:38:34 +0000 (10:38 -0700)]
mds: check for invalid file mode

Signed-off-by: Sage Weil <sage@newdream.net>