]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoheartbeatmap: simplify api
Sage Weil [Thu, 28 Jul 2011 16:10:17 +0000 (09:10 -0700)]
heartbeatmap: simplify api

reset_timeout(), clear_timeout() makes more sense than "touch".

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoheartbeatmap: fix stupid race
Sage Weil [Thu, 28 Jul 2011 16:07:02 +0000 (09:07 -0700)]
heartbeatmap: fix stupid race

atomic_t is probably better here, actually... :/

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoheartbeatmap: use a list<> instead of map<>
Sage Weil [Thu, 28 Jul 2011 16:02:07 +0000 (09:02 -0700)]
heartbeatmap: use a list<> instead of map<>

Don't need a map<> here.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoworkqueue: register and time out worker threads
Sage Weil [Thu, 28 Jul 2011 05:49:12 +0000 (22:49 -0700)]
workqueue: register and time out worker threads

Register and unregister worker threads.  Periodically touch heartbeat
when idle.  Set heartbeat timeout before processing a queue item.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoworkqueue: provide op timeout to workqueue constructor
Sage Weil [Thu, 28 Jul 2011 05:47:41 +0000 (22:47 -0700)]
workqueue: provide op timeout to workqueue constructor

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoheartbeatmap: introduce heartbeat_map
Sage Weil [Thu, 28 Jul 2011 05:38:43 +0000 (22:38 -0700)]
heartbeatmap: introduce heartbeat_map

Each thread registered and gets a private structure it can write a timeout
value to.  The timeout is time_t and always fits in a single word, so no
locking is used to update it.

Anyone can call is_healthy() to find out if any timeouts have expired.
Eventually some background thread will do this.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: mark ambig imports in ESubtreeMap during resolve
Sage Weil [Thu, 28 Jul 2011 04:44:44 +0000 (21:44 -0700)]
mds: mark ambig imports in ESubtreeMap during resolve

During resolve we may journal EImportFinish(true/false) as we resolve our
imports/exports.  And as a side-effect we may journal an ESubtreeMap.  We
need to properly mark ambig subtrees in that entry based on the
my_ambiguous_imports (resolve state), not just the migrator state (for the
active mds).

Note that the other Migrator::is_ambiguous_import() user
(send_resolve_now()) already does this correctly.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: pin inodes on LogSegment::truncating_inodes list
Sage Weil [Thu, 28 Jul 2011 04:29:05 +0000 (21:29 -0700)]
mds: pin inodes on LogSegment::truncating_inodes list

For active MDS, pin when we add to the list, unpin when we finish
truncating.

For replay, pin when we replay a truncate start, unpin when we replay a
truncate finish.  Use a nice helper for both.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: handle aborted slave rename while waiting for second prep
Sage Weil [Thu, 28 Jul 2011 03:46:03 +0000 (20:46 -0700)]
mds: handle aborted slave rename while waiting for second prep

When we get the first prep, we may respond to the master with an expanded
list of witnesses for the rename before making any change (or rollback
plan).  If the master fails before sending the second prep attempt, we
may end up in the abort path of _commit_slave_rename() with an empty
rollback_bl.  That's fine; don't crash.  We still need to unfreeze the
srci, but can skip the do_rename_rollback since we didn't actually journal
a change.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: honor scatter_wanted while freezing
Sage Weil [Wed, 27 Jul 2011 21:38:38 +0000 (14:38 -0700)]
mds: honor scatter_wanted while freezing

- mds A authpins item on mds B
- mds B starts to freeze tree containing item
- mds A tries wrlock_start on A, sends REQSCATTER to B
- mds B lock is unstable, sets scatter_wanted
- mds B lock stabilizes, calls try_eval, defers because freezing.
-> deadlock

In general, we want to avoid the eval while freezing to prevent starvation.
However, in this case with the multi-mds locking, we need to honor
the scatter_wanted even so.

Insert this check in try_eval().  This will catch it on the first try_eval
call after the lock stabilizes.  The ambiguous auth will never catch us
while freezing, and the master holds an auth_pin to prevent a freeze, so
we will never defer the eval; no need to do the same logic in the other
eval method (eval(MDSCacheObject*, ...)) used for retry.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: try_eval in many places
Sage Weil [Wed, 27 Jul 2011 21:32:24 +0000 (14:32 -0700)]
mds: try_eval in many places

These are the obvious places where we drop locks and may need to defer the
eval until after unfreeze.  There are probably more; a full audit is in
order.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: implement try_eval() on a single lock
Sage Weil [Wed, 27 Jul 2011 20:13:38 +0000 (13:13 -0700)]
mds: implement try_eval() on a single lock

We frequently call eval() on locks, usually after dropping an rd/wr/xlock.
At that point the eval() may do nothing because the object is now freezing
or frozen.  However, we still need to do the eval eventually.

These callers should eventually all switch to try_eval(), and retry as
needed.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: better debugging for scatter_wanted flag
Sage Weil [Wed, 27 Jul 2011 20:08:57 +0000 (13:08 -0700)]
mds: better debugging for scatter_wanted flag

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomdsmon: Fix handling of follow-by-name MDSes.
Greg Farnum [Thu, 28 Jul 2011 00:42:24 +0000 (17:42 -0700)]
mdsmon: Fix handling of follow-by-name MDSes.

We were accidentally setting them to standby-for-rank -1 if their
leader MDS wasn't active on startup. Things worked out in the end
anyway since they would go from standby to active for the appropriate
rank, but we want them to be in proper standby-replay!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agovstart: use paired MDSes with a specified standby.
Greg Farnum [Thu, 28 Jul 2011 00:41:09 +0000 (17:41 -0700)]
vstart: use paired MDSes with a specified standby.

I think this is a bit cleaner than specifying ranks manually.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoPG: add an assert for negative entries in the scrub map
Greg Farnum [Wed, 27 Jul 2011 19:01:38 +0000 (12:01 -0700)]
PG: add an assert for negative entries in the scrub map

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoosd: label ReplicatedPG::_scrub as virtual.
Greg Farnum [Tue, 26 Jul 2011 20:48:12 +0000 (13:48 -0700)]
osd: label ReplicatedPG::_scrub as virtual.

It is virtual in the parent class PG, and the style guide says to
label them in all classes so people don't forget.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoosd: turn down debug level on repop commit message
Greg Farnum [Tue, 26 Jul 2011 20:45:46 +0000 (13:45 -0700)]
osd: turn down debug level on repop commit message

We really don't need that to be the only thing sitting in logs.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorgw: parse date from http header
Yehuda Sadeh [Thu, 28 Jul 2011 00:02:17 +0000 (17:02 -0700)]
rgw: parse date from http header

14 years agorgw: return required error when conent length missing on PUT
Yehuda Sadeh [Wed, 27 Jul 2011 23:04:36 +0000 (16:04 -0700)]
rgw: return required error when conent length missing on PUT

14 years agoMerge branch 'next'
Sage Weil [Wed, 27 Jul 2011 19:43:47 +0000 (12:43 -0700)]
Merge branch 'next'

14 years agomds: make two passes on scatter_nudge
Sage Weil [Wed, 27 Jul 2011 19:42:21 +0000 (12:42 -0700)]
mds: make two passes on scatter_nudge

It's possible for scatter_nudge on a scatterlock in LOCK with dirty set to
go to MIX immediately and remain stable.  Give two 'nudge' passes before
we stop to avoid looping.

This fixes an assert failure where a nudge from log trimming ended up in a
stable state and asserted (!c).  The second pass will go trigger the dirty
writebehind.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: honor scatter_wanted flag in scatter_eval()
Sage Weil [Wed, 27 Jul 2011 19:40:35 +0000 (12:40 -0700)]
mds: honor scatter_wanted flag in scatter_eval()

We do in file_eval, but not here.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotestrados_delete_pool_while_open: remove from make
Colin Patrick McCabe [Wed, 27 Jul 2011 19:26:42 +0000 (12:26 -0700)]
testrados_delete_pool_while_open: remove from make

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoremove testrados_delete_pool_while_open
Colin Patrick McCabe [Wed, 27 Jul 2011 17:57:37 +0000 (10:57 -0700)]
remove testrados_delete_pool_while_open

This test duplicates the functionality of
testrados_delete_pools_parallel, but not as well.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix projected rename adjustment
Sage Weil [Tue, 26 Jul 2011 23:10:48 +0000 (16:10 -0700)]
mds: fix projected rename adjustment

- we may journal one (or _maybe_ both, probably not) of the subtree root
  addition OR the bound addition, depending on whether oldparent and
  newparent are auth.
- we can't rely on get_subtree_root() to move bounds since the projected
  subtree isn't a root in the real tree.  use CDir::contains() instead.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: clean out rename subtree cruft
Sage Weil [Tue, 26 Jul 2011 21:59:44 +0000 (14:59 -0700)]
mds: clean out rename subtree cruft

We used to force these subtrees for rename.  We don't anymore.. this is
old weirdness.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: simplify subtree map after adjusting for rename
Sage Weil [Tue, 26 Jul 2011 21:59:22 +0000 (14:59 -0700)]
mds: simplify subtree map after adjusting for rename

Merge the subtree with the parent if appropriate.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: track projected rename effect on subtree map
Sage Weil [Tue, 26 Jul 2011 21:58:35 +0000 (14:58 -0700)]
mds: track projected rename effect on subtree map

Renames can effect the subtree map.  We don't actually update it until the
rename commits, but while it is in flight to the jouranl we may journal
an ESubtreeMap event, which should reflect the change.

Adjust all callers (that journal) to project their change.

Mirror the logic in adjust_subtree_after_rename() in the subtree map
journaling code.  Be a bit careful, because we only journal subtrees that
we are auth for, so there are some additional checks to get a consistent
result.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: minor cap cleanups
Sage Weil [Tue, 26 Jul 2011 21:11:22 +0000 (14:11 -0700)]
mds: minor cap cleanups

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: only create up renamed diri frag subtrees if they differ from parent
Sage Weil [Tue, 26 Jul 2011 17:52:49 +0000 (10:52 -0700)]
mds: only create up renamed diri frag subtrees if they differ from parent

Commit 00ec86a2041 opens up subtrees with CDIR_AUTH_UNDEF blindly for any
renamed dir inode.  This is correct on the rename target, but not on a
random observer, where we end up with the parent and child having the
same auth.  Oddly the comment seemed to have it right.  Fix the code.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: reencode cap releases for each request
Sage Weil [Tue, 26 Jul 2011 05:17:24 +0000 (22:17 -0700)]
client: reencode cap releases for each request

I think commit f7170f9 was based on some of my bad advice.  Every time the
client sends a request, it should look at what caps it has that might
conflict with the operation and (if possible) release them with the
request.  I suspect I was confusing this with the case on the MDS side of
things where we only process the release(s) when we first receive the
message and not when it is deferred/retried.

Specifically, this fixes a problem where we send a request to mds A and
release some set of caps, A tells us to talk to B instead, and we resend
the same message with (old, now bogus) releases intended for A to B
instead, where they probably make no sense.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoadmin_socket: implement schema request
Colin Patrick McCabe [Tue, 26 Jul 2011 23:41:52 +0000 (16:41 -0700)]
admin_socket: implement schema request

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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 agosync_filesystem: er, fix #define
Sage Weil [Mon, 25 Jul 2011 20:53:04 +0000 (13:53 -0700)]
sync_filesystem: er, fix #define

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agosync_files: #include _GNU_SOURCE for syncfs()
Sage Weil [Mon, 25 Jul 2011 20:49:39 +0000 (13:49 -0700)]
sync_files: #include _GNU_SOURCE for syncfs()

Hopefully fixes: #1316
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoadmin_socket: no sock for unprivileged daemons; rename default
Sage Weil [Mon, 25 Jul 2011 20:48:56 +0000 (13:48 -0700)]
admin_socket: no sock for unprivileged daemons; rename default

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: verify src range exists for CLONERANGE
Sage Weil [Sat, 23 Jul 2011 21:36:46 +0000 (14:36 -0700)]
osd: verify src range exists for CLONERANGE

Make sure the source object extent does not extend past EOF when doing a
CLONERANGE.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoobjecter: treat RESETSESSION like a reset
Sage Weil [Mon, 25 Jul 2011 20:15:11 +0000 (13:15 -0700)]
objecter: treat RESETSESSION like a reset

Commit 065cdf5 rewrote ms_handle_reset but didn't adjust
ms_handle_remote_reset (they used to be identical).  The result is lost
MOSDOps if the osd ever sends a RESETSESSION.

Signed-off-by: Sage Weil <sage@newdream.net>
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 agoAdd more debugging for pthread_create failures
Colin Patrick McCabe [Mon, 25 Jul 2011 18:18:12 +0000 (11:18 -0700)]
Add more debugging for pthread_create failures

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>