]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agounit: Add test/base64.cc
Colin Patrick McCabe [Thu, 13 Jan 2011 18:23:49 +0000 (10:23 -0800)]
unit: Add test/base64.cc

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoAdd a target to build but not run unittests.
Tommi Virtanen [Thu, 13 Jan 2011 17:50:46 +0000 (09:50 -0800)]
Add a target to build but not run unittests.

Use with "make -C src unittests".

14 years agoFix src/test/run-cli-tests to work with any cwd.
Tommi Virtanen [Wed, 12 Jan 2011 21:28:11 +0000 (13:28 -0800)]
Fix src/test/run-cli-tests to work with any cwd.

14 years agoMerge branch 'clitests-3' into unstable
Sage Weil [Wed, 12 Jan 2011 20:04:16 +0000 (12:04 -0800)]
Merge branch 'clitests-3' into unstable

14 years agoAdjust clitests after cauthtool changes.
Tommi Virtanen [Wed, 12 Jan 2011 19:10:24 +0000 (11:10 -0800)]
Adjust clitests after cauthtool changes.

14 years agoMerge commit '735eb400dc617c599f8cb42af91bab00931eeaff' into clitests-z
Tommi Virtanen [Wed, 12 Jan 2011 18:58:52 +0000 (10:58 -0800)]
Merge commit '735eb400dc617c599f8cb42af91bab00931eeaff' into clitests-z

14 years agoAdjust clitests after cauthtool changes.
Tommi Virtanen [Wed, 12 Jan 2011 18:52:46 +0000 (10:52 -0800)]
Adjust clitests after cauthtool changes.

14 years agoMerge commit 'e9a70f15029d397ebf0414e5f16fda321af5f55b' into clitests-4
Tommi Virtanen [Wed, 12 Jan 2011 18:49:27 +0000 (10:49 -0800)]
Merge commit 'e9a70f15029d397ebf0414e5f16fda321af5f55b' into clitests-4

14 years agoFix osdmaptool error reporting.
Tommi Virtanen [Wed, 12 Jan 2011 18:24:08 +0000 (10:24 -0800)]
Fix osdmaptool error reporting.

14 years agouclient: Switch how inodes link to dentries a bit.
Greg Farnum [Tue, 4 Jan 2011 21:32:47 +0000 (13:32 -0800)]
uclient: Switch how inodes link to dentries a bit.

Inodes now have a set of parent dentries, rather than a single
pointer. This allows the cache to accurately represent multiple
hard links.
Various minor adjustments were made so that this change in
format works and is error checked.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoauth: change the plaintext keyring format
Yehuda Sadeh [Tue, 11 Jan 2011 22:51:19 +0000 (14:51 -0800)]
auth: change the plaintext keyring format

14 years agoRevert "client: Remove the I_COMPLETE flag from the parent directory in relink_inode."
Greg Farnum [Tue, 4 Jan 2011 21:34:52 +0000 (13:34 -0800)]
Revert "client: Remove the I_COMPLETE flag from the parent directory in relink_inode."

This reverts commit c43455cee4b7b45de6bd04454a40bc7016f2d6d1. We don't
need this fix any more since we now handle hard links properly!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoconf: ConfFile can parse bufferlists
Yehuda Sadeh [Tue, 11 Jan 2011 22:06:33 +0000 (14:06 -0800)]
conf: ConfFile can parse bufferlists

14 years agoosd: avoid creating some temporary coll_t objects
Colin Patrick McCabe [Mon, 3 Jan 2011 05:11:07 +0000 (21:11 -0800)]
osd: avoid creating some temporary coll_t objects

PG::coll caches the value of coll_t(this->info.pgid). So use PG::coll
when appropriate rather than constructing a new object.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: de-globalize PG::oldest_update
Colin Patrick McCabe [Tue, 28 Dec 2010 23:55:24 +0000 (15:55 -0800)]
osd: de-globalize PG::oldest_update

Making oldest_update a class variable complicates log merging and wastes
space in the PG struct. Even though memory is big, cachelines are still
small. Just calculate it when we need it.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: clean up loop in proc_replica_log
Colin Patrick McCabe [Tue, 28 Dec 2010 23:48:53 +0000 (15:48 -0800)]
osd: clean up loop in proc_replica_log

We don't need to update lu on (almost) every iteration, only on the
final one. Use a const iterator.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: remove unused PG global
Colin Patrick McCabe [Tue, 28 Dec 2010 22:27:25 +0000 (14:27 -0800)]
osd: remove unused PG global

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: call prior_set_affected only if we have one
Colin Patrick McCabe [Mon, 27 Dec 2010 21:53:52 +0000 (13:53 -0800)]
osd: call prior_set_affected only if we have one

Don't call prior_set_affected if the prior set hasn't been built. This
will be the case unless we're a primary doing peering.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: prevent PG objects from being copied
Colin Patrick McCabe [Mon, 27 Dec 2010 20:39:23 +0000 (12:39 -0800)]
osd: prevent PG objects from being copied

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: Put all prior_set fields into a struct
Colin Patrick McCabe [Mon, 27 Dec 2010 19:44:29 +0000 (11:44 -0800)]
osd: Put all prior_set fields into a struct

Keep all the prior set stuff together.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoRemove outdated TODO note.
Tommi Virtanen [Wed, 12 Jan 2011 17:18:55 +0000 (09:18 -0800)]
Remove outdated TODO note.

The test originally used cat <<EOF, which made
the mon$id in the config file get expanded at
that time.

14 years agoAdd CLI tests for osdmaptool and friends.
Tommi Virtanen [Wed, 12 Jan 2011 00:43:46 +0000 (16:43 -0800)]
Add CLI tests for osdmaptool and friends.

Uses a python package "cram" as test runner.
Requires PIP (python-pip.deb) installed on the
build machine, to actually run these tests.

The cram application itself is included as a
tarball that gets installed in a virtualenv
when the tests are run. cram is GPL.

14 years agoGit ignored files cleanup.
Tommi Virtanen [Tue, 11 Jan 2011 22:02:16 +0000 (14:02 -0800)]
Git ignored files cleanup.

Make gitignore entries not match recursively.

I wanted to introduce a directory "osdmaptool" to contain cli tests
for that tool, but all the files there were ignored because of these
rules.  Better be explicit about what you want ignored.

Move all ignores for generated binaries to be together.

Fixed "testecph" typo.

Added ignores for: testdout_streambuf testsignal_handlers testtimers.

14 years agoosd: OSD::queue_pg_for_deletion: avoid double del
Colin Patrick McCabe [Tue, 11 Jan 2011 18:15:02 +0000 (10:15 -0800)]
osd: OSD::queue_pg_for_deletion: avoid double del

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agodebian: make update_pbuilder.sh a bit smarter
Sage Weil [Sat, 8 Jan 2011 23:41:20 +0000 (15:41 -0800)]
debian: make update_pbuilder.sh a bit smarter

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agokeyring: can parse plain text keyring files
Yehuda Sadeh [Mon, 10 Jan 2011 23:50:26 +0000 (15:50 -0800)]
keyring: can parse plain text keyring files

14 years agoPort encoding tests over to gtest.
Tommi Virtanen [Mon, 10 Jan 2011 19:00:15 +0000 (11:00 -0800)]
Port encoding tests over to gtest.

14 years agoUse Google Test framework for unit tests.
Tommi Virtanen [Fri, 7 Jan 2011 21:15:40 +0000 (13:15 -0800)]
Use Google Test framework for unit tests.

Use ``make check`` to run the tests.

The src/gtest directory comes from ``svn export
http://googletest.googlecode.com/svn/tags/release-1.5.0 src/gtest``
and running "git add -f src/gtest".

gtest is licensed under the New BSD license, see src/gtest/COPYING.
For more on Google Test, see http://code.google.com/p/googletest/

Changed autogen.sh regenerate gtest automake files too. Make sure to
run ``./autogen.sh && ./configure`` after merging this commit, or
incremental builds may fail. The automake integration is inspired
heavily by the protobuf project, and may still be problematic.

Make git ignore files generated by gtest compilation.

Currently putting in just one new-style unit test, refactoring old
tests to fit will come in separate commits.

Note: if you are starting daemons, listening on TCP ports, using
multiple machines, mounting filesystems, etc, it's not a unit test
and does not belong in this setup. A framework for system/integration
tests will be provided later.

14 years agoMake git ignore generated files.
Tommi Virtanen [Mon, 10 Jan 2011 18:48:20 +0000 (10:48 -0800)]
Make git ignore generated files.

14 years agoos: don't crash on no-journal case
Colin Patrick McCabe [Sun, 9 Jan 2011 21:34:40 +0000 (13:34 -0800)]
os: don't crash on no-journal case

JournalingObjectStore::commit_start should handle the case where journal is
null. This will occur if the user doesn't configure a journal.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agotest_split.sh: add many_pools test
Colin Patrick McCabe [Fri, 7 Jan 2011 23:01:42 +0000 (15:01 -0800)]
test_split.sh: add many_pools test

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: fix _dout_lock recursion recursion
Sage Weil [Fri, 7 Jan 2011 22:17:21 +0000 (14:17 -0800)]
mds: fix _dout_lock recursion recursion

The get_snaps() method also something to dout.  We need to take care to
not do that as part of the ostream operator<< chain.  Fixes #684.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: take rdlocks on bounding dftlocks; clean up migrator lock code
Sage Weil [Thu, 6 Jan 2011 22:28:01 +0000 (14:28 -0800)]
mds: take rdlocks on bounding dftlocks; clean up migrator lock code

We need to take an rdlock on bounding dirfrags during migration for a
rather irritating reason: when we export the bound inode, we need to send
scatterlock state for the dirfrags as well, so that the new auth also gets
the correct info.  If we race with a refragment, this info is useless, as
we can't redivvy it up.  And it's needed for the scatterlocks to work
properly: when the auth is in a sync/lock state it keeps each dirfrag's
portion in the local (auth OR replica) dirfrag.

So: take a rdlock on the bounding dirfrags to avoid this.  Clean up the
Locker bulk rdlock interface while we're at it to be more general and
useful.

Also, while we're here, do an rdlock_try at this point.  Note that we still
are going to fail more often than before, since dftlocks will frequently
be scattered if there has been a recent fragmentation.  There is some
inevitable conflict here between refragmentation (which wants dftlock
in MIX) and exports (which want it SYNC).  TODO.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: make thrash_exports select random frags
Sage Weil [Thu, 6 Jan 2011 21:42:29 +0000 (13:42 -0800)]
mds: make thrash_exports select random frags

We were always picking the first frag.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: force dirfrag fragmention when replaying metablob
Sage Weil [Thu, 6 Jan 2011 19:49:56 +0000 (11:49 -0800)]
mds: force dirfrag fragmention when replaying metablob

We can have non-auth (and thus ambiguously fragmented) dirs in our cache.
When those get replayed, adjust our fragmentation as needed.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoReplicatedPG: register_object_context and register_snapset_context cleanup
Samuel Just [Fri, 7 Jan 2011 20:21:09 +0000 (12:21 -0800)]
ReplicatedPG: register_object_context and register_snapset_context cleanup

Previously, get_object_context and get_snapset_context did not register
the resulting objects.  In some cases, these objects would not get
registered and multiple copies would end up created.  This caused a bug
in find_object_context where get_snapset_context could return an object
distinct from the one referenced by the object returned from
get_object_context.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agolibrados: check for initialization before doing certain operations
Yehuda Sadeh [Fri, 7 Jan 2011 20:40:40 +0000 (12:40 -0800)]
librados: check for initialization before doing certain operations

14 years agolibrados: fix api declaration
Yehuda Sadeh [Fri, 7 Jan 2011 19:22:58 +0000 (11:22 -0800)]
librados: fix api declaration

14 years agolibrados: add rados->version, include librados.h from .hpp
Yehuda Sadeh [Fri, 7 Jan 2011 18:50:42 +0000 (10:50 -0800)]
librados: add rados->version, include librados.h from .hpp

14 years agolibrados-config: add man page
Yehuda Sadeh [Thu, 6 Jan 2011 23:11:34 +0000 (15:11 -0800)]
librados-config: add man page

14 years agolibrados-config: added a command line tool to dump librados version
Yehuda Sadeh [Thu, 6 Jan 2011 23:04:07 +0000 (15:04 -0800)]
librados-config: added a command line tool to dump librados version

14 years agoosd: Create all_osds_die test
Colin Patrick McCabe [Wed, 5 Jan 2011 00:37:37 +0000 (16:37 -0800)]
osd: Create all_osds_die test

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: mark osds down for not sending MOSDPGStat
Colin Patrick McCabe [Thu, 6 Jan 2011 21:33:07 +0000 (13:33 -0800)]
mon: mark osds down for not sending MOSDPGStat

PGMonitor::prepare_pg_stats should check to see if the stats in the
MOSDPgStats message are the same as the ones we already have. If so, no
need to create an incremental; just send an ACK and return false.

The leading Monitor now marks osds as down if they haven't sent a
MOSDPGStat message in the last 15 minutes.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: Always forward the PGStats to the leader
Colin Patrick McCabe [Tue, 4 Jan 2011 19:31:52 +0000 (11:31 -0800)]
mon: Always forward the PGStats to the leader

Always forward the PGStats to the leader, even if they are the same as
the old PGStats. The leader will mark as down osds that haven't sent
PGStats for a few minutes.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: Introduce osd_mon_report_interval_max
Colin Patrick McCabe [Tue, 4 Jan 2011 00:04:38 +0000 (16:04 -0800)]
osd: Introduce osd_mon_report_interval_max

After every g_conf.osd_mon_report_interval_max seconds, we send out a PG
stat update even if nothing has changed. This is to let the monitors
know that we're alive.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: don't allow Monitor to be copied
Colin Patrick McCabe [Tue, 4 Jan 2011 17:54:30 +0000 (09:54 -0800)]
mon: don't allow Monitor to be copied

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: remove obsolete comment
Colin Patrick McCabe [Tue, 4 Jan 2011 17:38:06 +0000 (09:38 -0800)]
mon: remove obsolete comment

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: Rename osd_mon_report_interval
Colin Patrick McCabe [Thu, 6 Jan 2011 02:29:09 +0000 (18:29 -0800)]
osd: Rename osd_mon_report_interval

Rename osd_mon_report_interval to osd_mon_report_interval_min.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: Introduce Monitor::leader_since
Colin Patrick McCabe [Mon, 3 Jan 2011 23:02:15 +0000 (15:02 -0800)]
mon: Introduce Monitor::leader_since

Introduce Monitor::leader_since to keep track of when the current
monitor became the leader.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'standby_replay' into unstable
Greg Farnum [Thu, 6 Jan 2011 23:39:14 +0000 (15:39 -0800)]
Merge branch 'standby_replay' into unstable

14 years agomds: Add is_any_replay() method and fill it in as appropriate.
Greg Farnum [Thu, 6 Jan 2011 23:37:59 +0000 (15:37 -0800)]
mds: Add is_any_replay() method and fill it in as appropriate.

This way we don't need to remember to call all three of is_replay(),
is_standby_replay(), is_oneshot_replay().

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMerge remote branch 'origin/unstable' into standby_replay
Greg Farnum [Thu, 6 Jan 2011 22:50:35 +0000 (14:50 -0800)]
Merge remote branch 'origin/unstable' into standby_replay

Conflicts:
src/cmds.cc
src/mds/MDS.cc
src/mds/MDS.h

14 years agolibrados: add library api versioning
Yehuda Sadeh [Thu, 6 Jan 2011 22:43:31 +0000 (14:43 -0800)]
librados: add library api versioning

14 years agojournaler: delete Contexts on finish() in new functions.
Greg Farnum [Mon, 20 Dec 2010 22:35:23 +0000 (14:35 -0800)]
journaler: delete Contexts on finish() in new functions.

Previously we weren't, and leaked memory.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomdcache: change replay trimming a bit.
Greg Farnum [Mon, 20 Dec 2010 21:32:43 +0000 (13:32 -0800)]
mdcache: change replay trimming a bit.

Previously we were re-inserting dentrys on the open list. But if
there weren't any other available dentrys to trim, this could
have led to an infinite loop!
Now, we save them in a list and pop them back in once the trim
is done.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: rename replay Contexts -- they were ambiguous at best.
Greg Farnum [Mon, 20 Dec 2010 21:10:44 +0000 (13:10 -0800)]
MDS: rename replay Contexts -- they were ambiguous at best.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: add gids to the logger file names.
Greg Farnum [Fri, 17 Dec 2010 23:56:44 +0000 (15:56 -0800)]
MDS: add gids to the logger file names.

This is just to make differentiating between the standby's files
and stuff easier.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomdlog: return EAGAIN if replay falls off the tail of the journal.
Greg Farnum [Fri, 17 Dec 2010 21:25:04 +0000 (13:25 -0800)]
mdlog: return EAGAIN if replay falls off the tail of the journal.

This can happen when we're following an active journal, and
would previously cause the MDS to shut down. Now we return EAGAIN,
so the MDS can recover as it likes.
Currently, that recovery is a simple respawn, as when we discover
we've fallen behind via probing.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agojournaler: Add init_headers function, call when reading head off disk.
Greg Farnum [Fri, 17 Dec 2010 00:47:30 +0000 (16:47 -0800)]
journaler: Add init_headers function, call when reading head off disk.

Uninitialized headers were causing a failed assert during replay,
and there's no good reason to leave them set at their defaults just
because the *current* incarnation of this MDS has never written to
disk!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomds: After probing the journal, reset if we've fallen behind.
Greg Farnum [Thu, 16 Dec 2010 19:53:38 +0000 (11:53 -0800)]
mds: After probing the journal, reset if we've fallen behind.

Previously, if the journal got trimmed and we missed log entries,
we failed out in the journaling step and stopped.
This is still possible and needs to be fixed, but pre-emptively checking
that we're still in the live part of the journal narrows the race range.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: make standby_trim_segments functional. Hurray, hot standbys work!
Greg Farnum [Wed, 15 Dec 2010 00:45:50 +0000 (16:45 -0800)]
MDS: make standby_trim_segments functional. Hurray, hot standbys work!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomdlog: Add some helper functions for accessing segments map data.
Greg Farnum [Wed, 15 Dec 2010 00:45:21 +0000 (16:45 -0800)]
mdlog: Add some helper functions for accessing segments map data.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomdcache: adjust trim() to handle running during standby-replay.
Greg Farnum [Wed, 15 Dec 2010 00:44:55 +0000 (16:44 -0800)]
mdcache: adjust trim() to handle running during standby-replay.

This just means it needs to handle files on the open list and not
trim them. Add a check for that with an assert, and keep them alive.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoelist: add a clear_list function.
Greg Farnum [Wed, 15 Dec 2010 00:43:45 +0000 (16:43 -0800)]
elist: add a clear_list function.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agolru: change control flow and an assert to keep purpose clearer.
Greg Farnum [Tue, 14 Dec 2010 18:37:13 +0000 (10:37 -0800)]
lru: change control flow and an assert to keep purpose clearer.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDSMonitor: Remove STATE_ONESHOT_REPLAY from takeover logic in tick().
Greg Farnum [Thu, 9 Dec 2010 00:30:32 +0000 (16:30 -0800)]
MDSMonitor: Remove STATE_ONESHOT_REPLAY from takeover logic in tick().

If something dies during a journal-check we shouldn't have anybody
doing standby for them, so assert out!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDSMonitor: Do not set the rank of an MDS in standby-replay
Greg Farnum [Wed, 8 Dec 2010 17:42:57 +0000 (09:42 -0800)]
MDSMonitor: Do not set the rank of an MDS in standby-replay
or oneshot-replay modes.

This was causing issues with identification in various circumstances,
and turns out to be unnecessary. The MDS now will set its whoami
variable from the standby_for_rank field if that's appropriate.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: MDSMonitor: if MDS is in standby-replay and its leader goes down,
Greg Farnum [Wed, 8 Dec 2010 17:39:59 +0000 (09:39 -0800)]
MDS: MDSMonitor: if MDS is in standby-replay and its leader goes down,
take over as the MDS!

This means we can now exit standby-replay.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDLog: don't change expire_pos or read_pos on replay.
Greg Farnum [Tue, 7 Dec 2010 20:46:10 +0000 (12:46 -0800)]
MDLog: don't change expire_pos or read_pos on replay.

These are unnecessary or rendered irrelevant by previous commit
removing read_pos from the on-disk Header.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: Remove the unused read_pos field.
Greg Farnum [Tue, 7 Dec 2010 19:48:08 +0000 (11:48 -0800)]
Journaler: Remove the unused read_pos field.

Rename it to unused_field, fill the in-memory read_pos
from header.expire_pos, and fill unused_field with the expire_pos
for safety.
(The on-disk header pos was used to fill in read_pos, but it was
always reset to expire_pos before being used and was only ever
set at the end of replay.)

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: miscellaneous standby-replay fixes and cleanups.
Greg Farnum [Fri, 3 Dec 2010 00:38:00 +0000 (16:38 -0800)]
MDS: miscellaneous standby-replay fixes and cleanups.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMDS: make use of the hooks to start standby-replay.
Greg Farnum [Fri, 3 Dec 2010 00:36:22 +0000 (16:36 -0800)]
MDS: make use of the hooks to start standby-replay.

This doesn't include trim, and there's no way to exit the replay!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoosd, rados: pgls filter cleanups
Yehuda Sadeh [Thu, 6 Jan 2011 19:09:01 +0000 (11:09 -0800)]
osd, rados: pgls filter cleanups

14 years agoobjecter: use raw_pg_to_pg when needed
Sage Weil [Thu, 6 Jan 2011 18:38:39 +0000 (10:38 -0800)]
objecter: use raw_pg_to_pg when needed

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMDS: Implement the hooks for standby_replay.
Greg Farnum [Wed, 1 Dec 2010 21:28:44 +0000 (13:28 -0800)]
MDS: Implement the hooks for standby_replay.

This commit adds the necessary state checks and machinery
for the MDS to go through a "looping" replay.
It does not yet implement online trimming, nor is there any
way to get the MDS into or out of a standby_replay state.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agojournaler: add reread_head_and_probe function.
Greg Farnum [Wed, 1 Dec 2010 18:05:16 +0000 (10:05 -0800)]
journaler: add reread_head_and_probe function.

It does both so callers don't need to implement
intermediate bottom-half handlers.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomds: add expire_pos to the ESubtreeMap.
Greg Farnum [Tue, 30 Nov 2010 22:00:32 +0000 (14:00 -0800)]
mds: add expire_pos to the ESubtreeMap.

This will allow more efficient trimming during standby_replay.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomds: extend the use of uint64_t instead of (signed) loff_t, et al.
Greg Farnum [Wed, 24 Nov 2010 21:44:37 +0000 (13:44 -0800)]
mds: extend the use of uint64_t instead of (signed) loff_t, et al.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomds: rename is_standby_replay() to is_oneshot_replay.
Greg Farnum [Wed, 24 Nov 2010 21:28:49 +0000 (13:28 -0800)]
mds: rename is_standby_replay() to is_oneshot_replay.
This better represents its current purpose.

14 years agomds: Create new STATE_ONESHOT_REPLAY for the MDS.
Greg Farnum [Wed, 24 Nov 2010 00:20:05 +0000 (16:20 -0800)]
mds: Create new STATE_ONESHOT_REPLAY for the MDS.

This takes over the previous behavior of STATE_STANDBY_REPLAY,
allowing standby-replay to be used for the upcoming continuous-replay
that will enable hot standbys.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: make reprobe() an asynchronous function.
Greg Farnum [Tue, 23 Nov 2010 00:19:06 +0000 (16:19 -0800)]
Journaler: make reprobe() an asynchronous function.

This better fits the spirit of the other functions, and the MDS itself.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: make reread_head an asynchronous function.
Greg Farnum [Mon, 22 Nov 2010 20:39:34 +0000 (12:39 -0800)]
Journaler: make reread_head an asynchronous function.

This better fits the spirit of the other functions, and the MDS itself.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: redefine states to make them all unique.
Greg Farnum [Mon, 22 Nov 2010 18:54:54 +0000 (10:54 -0800)]
Journaler: redefine states to make them all unique.

Apparently PROBING and ACTIVE being identical was a mistake.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: Set the privacy of new functions correctly.
Greg Farnum [Fri, 19 Nov 2010 18:48:38 +0000 (10:48 -0800)]
Journaler: Set the privacy of new functions correctly.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: use uint64_6 instead of int64_t.
Greg Farnum [Fri, 19 Nov 2010 18:36:40 +0000 (10:36 -0800)]
Journaler: use uint64_6 instead of int64_t.

Since the values can never be negative, this is far more appropriate,
and it results in fewer casts than the other way around.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: Add function reprobe, to search for the new end of log.
Greg Farnum [Fri, 19 Nov 2010 18:13:47 +0000 (10:13 -0800)]
Journaler: Add function reprobe, to search for the new end of log.

Add new REPROBING state and split up new function probe() from _finish_read_head.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: Add reset() function, which returns it to the immediate post-ctor state
Greg Farnum [Fri, 19 Nov 2010 02:19:30 +0000 (18:19 -0800)]
Journaler: Add reset() function, which returns it to the immediate post-ctor state

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: Add a read-only setting, and asserts to make it fail on writes if readonly.
Greg Farnum [Thu, 18 Nov 2010 22:51:38 +0000 (14:51 -0800)]
Journaler: Add a read-only setting, and asserts to make it fail on writes if readonly.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: add new reread_head function and state.
Greg Farnum [Thu, 18 Nov 2010 19:56:04 +0000 (11:56 -0800)]
Journaler: add new reread_head function and state.

This is to facilitate the forthcoming up_shadow MDS state.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: remove unused vector<snapid_t> snaps from recover().
Greg Farnum [Thu, 18 Nov 2010 00:36:46 +0000 (16:36 -0800)]
Journaler: remove unused vector<snapid_t> snaps from recover().

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoJournaler: set state to STATE_ACTIVE in _finish_probe_end.
Greg Farnum [Thu, 18 Nov 2010 00:33:41 +0000 (16:33 -0800)]
Journaler: set state to STATE_ACTIVE in _finish_probe_end.

This was never actually getting set, although it doesn't matter
since STATE_ACTIVE and STATE_PROBING are defined to be the same.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoobjecter, librados: propagate extra pgls info to client
Yehuda Sadeh [Thu, 6 Jan 2011 18:20:37 +0000 (10:20 -0800)]
objecter, librados: propagate extra pgls info to client

14 years agocommon: dout_create_rank_symlink: init if needed
Colin Patrick McCabe [Thu, 6 Jan 2011 02:15:12 +0000 (18:15 -0800)]
common: dout_create_rank_symlink: init if needed

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: remove stray reference& in FragmentMarking context
Sage Weil [Thu, 6 Jan 2011 00:42:33 +0000 (16:42 -0800)]
mds: remove stray reference& in FragmentMarking context

Led to confusing occasional(!) crashes on marking completion.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: change refragment journaling/store strategy
Sage Weil [Wed, 5 Jan 2011 23:31:06 +0000 (15:31 -0800)]
mds: change refragment journaling/store strategy

We had a serious problem before where we were updating the cache and
redivvying up the dentries among fragments, but not immediately
journaling it.  This was okay only if we were lucky and no other update
journaled something (e.g. some random child journaling its ancestors).

Instead, journal (PREPARE) immediately and in parallel with the new
dirfrag stores.  When the stores complete, journal again (COMMIT).  On
journal replay, for any PREPAREs without matching COMMITS we immediately
journal a ROLLBACK.

Other behavior is essentially unchanged.  We don't send the notify until
both the PREPARE and STORES complete.  But that part doesn't really matter:
if we restart and rollback, peers will find out during resolve/rejoin,
as before.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: make adjust_dir_fragments always adjust fragtree
Sage Weil [Wed, 5 Jan 2011 23:17:36 +0000 (15:17 -0800)]
mds: make adjust_dir_fragments always adjust fragtree

If we have the inode but no dirfrags, we still need to adjust the
inode dirfragtree.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/testing' into unstable
Sage Weil [Thu, 6 Jan 2011 00:48:11 +0000 (16:48 -0800)]
Merge remote branch 'origin/testing' into unstable

14 years agomds: fix can_authpin assert on post-fragment commit
Sage Weil [Wed, 5 Jan 2011 20:49:58 +0000 (12:49 -0800)]
mds: fix can_authpin assert on post-fragment commit

We wan to ignore the authpinnability check here; we already have the
(old) frag frozen, so no worries about starvation and retaking an auth_pin.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: add mds_debug_frag option
Sage Weil [Wed, 5 Jan 2011 19:51:30 +0000 (11:51 -0800)]
mds: add mds_debug_frag option

Verify dirfragtree matches any open dirfrags.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd, rados: pgls filter fixes
Yehuda Sadeh [Thu, 6 Jan 2011 00:50:07 +0000 (16:50 -0800)]
osd, rados: pgls filter fixes