Not even sure where min() was coming from, but it seems to be missing on
i386 lucid.:
g++ -DHAVE_CONFIG_H -I. -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic -g -O2 -MT rbd.o -MD -MP -MF .deps/rbd.Tpo -c -o rbd.o rbd.cc
rbd.cc: In function 'int do_import(void*, const char*, int, const char*)':
rbd.cc:837: error: no matching function for call to 'min(uint64_t&, off_t)'
make[3]: *** [rbd.o] Error 1
Reported-by: John Leach <john@johnleach.co.uk>
Signed-off-by: Sage Weil <sage@newdream.net>
I've found the manpage problem that I've noted before. It's about
monmaptool, the CLI says it's usage:
[--print] [--create [--clobber]] [--add name 1.2.3.4:567] [--rm name]
<mapfilename>
But the manpage states this as an example:
monmaptool --create --add 192.168.0.10:6789 --add 192.168.0.11:6789 --add
192.168.0.12:6789 --clobber monmap
This definitely misses 'name' after the 'add' switch, resulting:
"invalid ip:port '--add'" as an error message. Attached patch fixes this
inconsistency.
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
If for some reason we enter scrub() without scrub_reserved == true, don't
adjust the osd->scrubs_pending or we'll screw up the accounting.
Signed-off-by: Sage Weil <sage@newdream.net>
Create a copy constructor for object_info_t, since we often want to copy
an object_info_t and would rather not try to remember all the fields.
Drop the lost parameter from one of the other constructors, because it's
not used that much.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
mark_all_unfound_as_lost: just delete items from the rmissing set as we
find them, rather than using a multi-pass system.
Update info.last_update as we go so that log printouts will look correct
(the log printout function checks info.last_update)
Don't remove from missing or missing_loc in mark_obj_as_lost.
PG::missing_loc should never have the soid, and PG::missing we handle
elsewhere.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
In PG::mark_obj_as_lost, we have to mark a missing object as lost. We
should not assume that we have an old version of the missing object in
the ObjectStore. If the object doesn't exist in the object store, we
have to create it so that recovery can function correctly.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
This one verifies:
1. Client asks for an unfound object and gets put to sleep
2. Object gets declared lost
3. Client wakes up
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We don't have enough information to mark objects as lost until we
activate the PG. might_have_unfound isn't even built until PG::activate.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Make all survivors participate in resolve stage, so that survivors can
properly determine the outcome of migrations to the failed node that did
not complete.
The sequence (before):
- A starts to export /foo to B
- C has ambiguous auth (A,B) in it's subtree map
- B journals import_start
- B fails
...
- B restarts
- B sends resolves to everyone
- does not claim /foo
- A sends resolve _only_ to B
- does claim /foo
- B knows it's import did not complete
- C doesn't know anything. Also, the maybe_resolve_finish stuff was
totally broken because the recovery_set wasn't initialized
See new (commented out) assert in Migrator.cc to reproduce the above.
Signed-off-by: Sage Weil <sage@newdream.net>
In _process_pg_info, if the primary sends us a PG::Log, a replica should
merge that log into its own.
mark_all_unfound_as_lost / share_pg_log: don't send the whole PG::Log.
Just send the new entries that were just added when marking the objects
as lost.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We can now permanently mark objects as lost by setting the lost bit in
their object_info_t. Rev the object_info_t struct.
get_object_context: re-arrange this so that we're always setting the
lost bit. Also avoid some unecessary steps.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
In activate_map, we now mark objects that we know are unfindable as
lost. This relies on the might_have_unfound set introduced earlier.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Commit 6e2b594b fixed a bunch of bad get_object_context() calls, but even
with the parameter fixed some were still broken. Pass in a valid oloc in
those cases. The only places where OLOC_BLANK _is_ still uses is when we
know we have the object locally and will load a valid value off disk.
Signed-off-by: Sage Weil <sage@newdream.net>
Otherwise we hit bad asserts if an object of the same name in different
pools is getting recovered simultaneously.
Signed-off-by: Sage Weil <sage@newdream.net>
We don't want to add to the throttler if we aren't going to queue the
write, or else we'll never take it off again.
Signed-off-by: Sage Weil <sage@newdream.net>
If they wake up out of order (which, theoretically, they could before) we
can screw up journal submitting order in writebehind mode, or apply order
in parallel and writeahead journal mode.
Signed-off-by: Sage Weil <sage@newdream.net>
Verify/assert that we aren't screwing up the submission pipeline ordering.
Namely, we want to make sure that if op_apply_start() blocks, we wake up
in the proper order and don't screw up the journaling.
Signed-off-by: Sage Weil <sage@newdream.net>
Keep distinct states for FULL, WAIT, and NOTFULL.
The old code was more or less correct at one point, but assumed the seq
changed on each commit, not each operation; in it's prior state it was
totally broken.
Also fix throttling (we were leaking items in the throttler that were
submitted while the journal was full).
Signed-off-by: Sage Weil <sage@newdream.net>
- Combine journal_lock and lock.
- Move throttling outside of the lock (this fixes potential deadlock in
parallel journal mode)
- Make interface nomenclature a bit more helpful
Signed-off-by: Sage Weil <sage@newdream.net>
In parallel mode, queue_op is called while holding the journal lock, so it
is not okay to throttle there. Instead, throttle in the caller.
The throttling still needs improvement, but this at least fixes the locking
problem.
Signed-off-by: Sage Weil <sage@newdream.net>