Eliminate calls to dout that use non-existent log levels, like negative
levels less than -1. Also trigger a compiler error in the future if they
get re-added. -1 is the highest priority dout level; putting lower
priorities into the output buffer will just cause errors.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
cmds: cerr -> derr
DoutStreambuf: primitive_log: just write to the stdout fd rather than cerr
assert: don't write output to stderr manually (dout will do that
automatically). Do _dout_lock.Lock rather than TryLock. Failing to wait
for the lock is potentially buggy and provides no benefit in that code.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
sub_op_scrub must set finalizing_scrub on the replica
before waiting for last_update_applied to catch up to
info.last_update.
Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
Use derr to announce errors in FileJournal.
Handle EINTR where necessary (still haven't fixed
read/write/pread/pwrite uses).
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Re-introduce derr as a special log level (level -1) which will show up
in all logs, and on stderr. These messages are the only messages which
will show up on stderr.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Li's revised interface for the async snap ioctl is more flexible. Update
the ioctl call sites and detection code accordingly.
Signed-off-by: Sage Weil <sage@newdream.net>
Otherwise, we could choose new stray dirs and fail to get all
the locks we needed (while leaving old strays locked forever!).
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Calling messenger->add_dispatcher_head() has the side-effect of starting
the messenger thread. So we must not do it before calling
messenger->start(), which sometimes calls daemonize.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We need to detect when a pg mapping changes but the primary stays the same.
That means we can't just look at the final osdmap and see what is says; we
have to look at each intervening map and check each request to see if
something switched and the osd has thrown our request out.
Also refactor and clean up the linger vs normal op stuff some more.
Signed-off-by: Sage Weil <sage@newdream.net>
This is a big cleanup. Also
- switch to keeping per-osd Connection *'s
- make requests time out independently (not very efficiently yet)
Signed-off-by: Sage Weil <sage@newdream.net>
This will make observer crashes due to missed states (#648) much harder to
hit. Eventually the pgmap state trim problem will go away when the
monitor/paxos code is restructured (#647).
Signed-off-by: Sage Weil <sage@newdream.net>
Use Mutex::Locker to make logging exception-safe. That is, if you are
doing "dout() << foo() << dendl;" and foo throws an exception, the dout
mutex will not be left in a locked state.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Rename tools files to be more consistent. For example, the main()
function for ./ceph should be in ceph.cc.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We only want the user-provided ack/commit callbacks to trigger the first
time we register the lingering op. Same goes for the eversion_t *objver.
Signed-off-by: Sage Weil <sage@newdream.net>
If it is a _replayed_ request, we should always send a simple ack if it is
completed, because the client doesn't not care about any additional caps.
If it is a _resent_ request, then we want to return useful caps on open or
create requests, even if any modification side-effects have already been
committed. The additional checks for completed already exist in the
create and open handlers.
Signed-off-by: Sage Weil <sage@newdream.net>