Commit Graph

11979 Commits

Author SHA1 Message Date
Colin Patrick McCabe
2a5c38939b mds-dumper: Define Dumper::~Dumper()
To fix compile error.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-19 19:14:29 -08:00
Colin Patrick McCabe
8566c5cd71 ReplicatedPG::pull: fix test for unfound
The test for unfound objects was reversed, leading us to try to pull
unfound objects and refrain from pulling objects that we knew how to
get. Should fix bug #585.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-19 14:21:00 -08:00
Sage Weil
2f5502fabd osdmap: fix printing, again
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-19 13:41:58 -08:00
Sage Weil
4303820b43 Merge remote branch 'origin/mds' into unstable 2010-11-19 10:17:58 -08:00
Colin Patrick McCabe
b91e14e122 multi-dump.sh: add diff mode
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-18 21:13:02 -08:00
Colin Patrick McCabe
9cab522e71 Add multi-dump.sh
This is a debug tool that can dump out Ceph information at various
epochs. For instance, it can show how the OSDmap changed over time.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-18 20:57:15 -08:00
Colin Patrick McCabe
6e2b594b33 ReplicatedPG::get_object_contect: fix broken calls
ReplicatedPG::get_object_context takes three parameters.  The last two
are "const object_locator_t& oloc" and "bool can_create".
Unfortunately, booleans can degrade to ints, and ints can be used to
initialize objects of type object_locator_t.

So when you make a call like:
> ctx->snapset_obc = get_object_context(snapoid, true);

What happens is that you actually call:
> get_object_context(snapoid, object_locator(1), false);

So you pass an invalid and *not* blank object_locator_t, and pass false
for can_create. This is not what the caller wanted. This change gets rid
of the default parameters and fixes the callers.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-18 15:05:29 -08:00
Colin Patrick McCabe
43e0b2670b ReplicatedPG: call finish_recovery when needed
Don't loop in ReplicatedPG::start_recovery_ops. There is already a loop
in both recover_replicas and recover_primary that will try to do as many
recovery ops as it can, there's no need to repeat it. Also, the former
loop provably would never execute more than once because of the way
the code was structured.

If there are no more recovery operations to do, and PG::is_all_uptodate
is true at the end of ReplicatedPG::start_recovery_ops, call
finish_recovery.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-18 12:50:23 -08:00
Colin Patrick McCabe
ea5d1d6693 osd_resurrection_1_impl: turn on recovery at end
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-18 10:09:14 -08:00
Jim Schutt
4adfdee7f1 Makefile: fix builddir weirdness
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
2010-11-17 16:52:19 -08:00
Sage Weil
7e9812b4a9 osd: rev PG::Info encoding for last_epoch_clean change
This was missed by 184fbf582b, so any fs
created between now and then won't decode properly.  It's more important
to make an fs prior to that work, though, so that the upgrade path from
the last stable version works.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 14:37:38 -08:00
Sage Weil
c17e7da4d1 Merge branch 'mds_frags' into unstable 2010-11-17 13:06:14 -08:00
Sage Weil
f6823a79a6 mds: adjust dir_auth_pins on steal_dentry
dir_auth_pins is a counter of dentry auth_pins in the current dir; those
need to be added in when stealing.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:03 -08:00
Sage Weil
b705be1187 mds: wrlock scatterlocks to prevent a gather racing with split/merge logging
We have the dirs split in our cache for some time while journaling it to
disk, before the fragment_notify goes out.  Make sure we don't do a
scatterlock gather during that time that will confuse the inode auth (who
has their dirfrags fragmented differently).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:03 -08:00
Sage Weil
66d43ac867 mds: fix subtree map update on dirfrag merge
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:03 -08:00
Sage Weil
7f6a256146 mds: clear PIN_SUBTREE on split/merge in purge_strays
This makes the helper work for merge as well as split.  Remove the special
fixups in the caller that were making split work before.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:03 -08:00
Sage Weil
669b55440f mds: don't complete freeze while parent inode is frozen
This makes maybe_finish_freeze() conditions match that of is_freezeable()
and avoids an assert.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:02 -08:00
Sage Weil
3777ff8a9a mds: move dirty rstat inodes to new dir on refragment
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:02 -08:00
Sage Weil
d538817f62 mds: flush log on fragment
This makes request lock auth_pins expire, so the fragment moves along.
Otherwise we can end up waiting for the log flush timer to go off.

This isn't a complete solution; in-progress requests won't know to flush.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:02 -08:00
Sage Weil
cd5ee00602 mds: initialize PIN_SUBTREE on split
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:06:02 -08:00
Sage Weil
b58b8d098e mds: fix discover requests, tracking wrt fragments
Track discover requests by tid.  The old system of tracking outstanding
discovers was kludgey and somewhat broken.  Also there is a possibility
of getting dup replies if someone does kick_requests().

There is still room for improvement with the logic detemrining when a
discover is sent: we may want to discover multiple dirfrags in parallel,
but the current code will only do one at a time.

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

comment
2010-11-17 13:04:17 -08:00
Sage Weil
a63c06c89f mds: fix EFragment replay
If the inode already exists in our cache, adjust our (existing) fragments.
But it might not.  In that case, we just replay the metablob.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:02:39 -08:00
Sage Weil
a961049b71 mds: don't fragment mdsdir or .ceph
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 13:02:38 -08:00
Jim Schutt
b54880e0f9 Detect broken system linux/fiemap.h
RedHat 5.5 has a /usr/include/linux/fiemap.h, but it is
broken because it does not itself include linux/types.h.
As a result, __u64 and friends are not defined.

We have a Ceph-local copy of fiemap.h, so use it
if the system version is broken.

While we're at it, fix up the configure message to
note we're using a local copy.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 12:48:00 -08:00
Sage Weil
29a9e66841 osdmap: don't include blacklist info in summary
It's confusing users and isn't that important.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-17 10:24:21 -08:00
Samuel Just
d57181d3d5 config: added max_mds
MDSMonitor: create_new_fs adapted to use the max_mds parameter

max_mds is now a configurable value and create_new_fs will initialize
max_mds to the specified value.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
2010-11-16 16:09:47 -08:00
Sage Weil
d1dcc03566 mds: allow frag merge on subtree root
Fix purge_stolen and adjust_dir_fragments.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 12:09:00 -08:00
Sage Weil
c49312659a mds: make dirfrag thrashing join and split
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 12:09:00 -08:00
Sage Weil
8f24919d39 mds: add timestamp to LogEvents
This just gives us a bit of useful info when debugging problems.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 12:08:12 -08:00
Sage Weil
56b9e92716 osd: fix trailing + in pg state string rendering
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:32:19 -08:00
Sage Weil
2c9873f06c Merge remote branch 'origin/unfound' into unstable 2010-11-16 10:10:43 -08:00
Sage Weil
d17f7444ee mds: be less noisy about cap imports
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:06:05 -08:00
Sage Weil
05bd6b078d Merge branch 'mds_dir_hash' into unstable 2010-11-16 10:01:15 -08:00
Sage Weil
77c05fbc04 mds/client: pass dir hash over the wire
Add a feature bit DIRLAYOUTHASH.

Also fix client request routing for lookups (we were only hashing when
a Dentry pointer was provided, not when a relative path was).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:01:05 -08:00
Sage Weil
3358046072 mds: set dir hash on root inode
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:01:05 -08:00
Sage Weil
be29e4c3ee mds: set mode before all the file type dependent inode initialization!
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:01:05 -08:00
Sage Weil
cc709df896 mds: add DIRLAYOUTHASH feature bit
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:01:05 -08:00
Sage Weil
e146767e5d mds: make dentry hash a dir layout property
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-16 10:01:05 -08:00
Colin Patrick McCabe
267cd845c7 RadosClient::shutdown: call monclient::shutdown
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 18:33:22 -08:00
Colin Patrick McCabe
dfb78ebf3e osd: don't stop recovery when there are unfound
There are two phases in recovery: one where we get all the right objects
on to the primary, and another where we push all those objects out to
the replicas. Formerly, we would not start the second phase until there
were no missing objects at all on the primary.

This change modifies that so that we will start the second phase even if
there are unfound objects. However, we will still wait for all findable
missing objects to be brought to us, of course.

Get rid of uptodate_set. We can find the same information by looking at
the missing and missing_loc sets directly. Keeping the uptodate_set...
er... up-to-date would be very difficult in the presence of all the things
that can modify the missing and missing_loc sets.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 18:22:13 -08:00
Colin Patrick McCabe
d014acb6d5 dumpjournal.cc: fix compile
dumpjournal needs to create its own SafeTimers and pass them in to some
constructors.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 17:03:43 -08:00
Yehuda Sadeh
da2d50180d rbd: fix rbd snap rm class handling 2010-11-15 16:44:01 -08:00
Sage Weil
250d414e4d Merge remote branch 'origin/unfound_last_epoch_clean' into unstable 2010-11-15 14:59:46 -08:00
Colin Patrick McCabe
c7075115ba Add ./ceph osd tell <osd-num> dump_missing <out>
Add a command that tells the OSD to dump its missing set for all PGs to
a file. This should be useful for debugging multi-OSD scenarios.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 14:47:44 -08:00
Colin Patrick McCabe
755f575929 search_for_missing:recalc stats if unfound changed
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 14:38:36 -08:00
Greg Farnum
d883a547ac mds: Use CDir bloom filter as appropriate.
Add items to the bloom filter when trimming, and look for them
in the filter in the few places where a simple existence
check suffices for our needs.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
2010-11-15 13:31:31 -08:00
Greg Farnum
be2da00aa3 mds: Add bloom filter to CDir.
You can now add items to a bloom filter and check for their existence.
This is intended to be used when trimming items out of the cache; the
filter is cleared when you mark_complete and is not transferred between
nodes. Neither does it change how you set or remove the STATE_COMPLETE flag.
You must explicitly check the bloom filter as appropriate; likewise, if
you start to fill it in you must always continue filling it in until
you delete the current instance of the filter.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
2010-11-15 13:31:25 -08:00
Sage Weil
1fe31e18a6 timer: make init/shutdown explicit
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-15 13:23:42 -08:00
Colin Patrick McCabe
d2af7b7e39 test_unfound.sh: start recovery at end of test
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 12:39:56 -08:00
Colin Patrick McCabe
c293b9af1c test_common.sh: add dump_osd_store
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-15 12:31:43 -08:00