We need to set the subtree bounds before trimming it away, or else we may
throw out things we're still auth for.
Signed-off-by: Sage Weil <sage@newdream.net>
If we come back up on the same address, there is a possible race. Other
nodes will mark_down when they see us go down. If we go up first, queue
some messages, and _then_ they see that we're down and mark_down, the
messages we queued will get lost. Since it's stateful on the cluster
backend, we need to introduce an ordering so that closing out the _old_
session doesn't break the new session. We do this by binding to a new
address (just a different port, actually) before marking ourselves back
up.
Fixes#592.
Signed-off-by: Sage Weil <sage@newdream.net>
Closes out all old connections and binds to a _different_ port. This
ensures that someone doing mark_down on our old address won't get us.
Signed-off-by: Sage Weil <sage@newdream.net>
Accomplish this by making a list of cap releases in the (permanent)
MetaRequest, and then copying that into the (potentially-temporary)
MClientRequest.
Always set up cluster_messenger (before we would only do so if there was
an explicit address configured for it). The overhead to do so is minimal,
it simplifies the code, and will allow us to fix down->up transitions
(later).
Signed-off-by: Sage Weil <sage@newdream.net>
For example, if an osd sends an empty PG::Info (last_update = 0'0) and
empty missing, we should not conclude that the object is there.
Signed-off-by: Sage Weil <sage@newdream.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>