Sage Weil [Thu, 19 May 2011 22:03:13 +0000 (15:03 -0700)]
client: hold FILE_BUFFER ref while waiting for dirty throttle
We may block in the write path because we've reached out dirty data limit.
Hold a reference to the FILE_BUFFER cap during that interval so we don't
lose the cap and put new dirty buffers into the objectcacher out of turn.
(We could also recheck our ability to take the ref after blocking, but I
think this is cleaner.)
Sage Weil [Thu, 19 May 2011 22:00:34 +0000 (15:00 -0700)]
client: assert(in) on _flush
We should never arrive in _flush() and not have a reference to the inode
in question, because the presence of dirty buffers pins the inode. This
condition was introduced forever ago; clean it out.
I'm not having any problems linking. I suspect this was some automake
failure and that a 'make clean' is all that's needed to put everything
straight...
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 18 May 2011 17:09:34 +0000 (10:09 -0700)]
logclient: get rid of send_log; simplify monitor special casing
Change the SYNC flag to MON and send the Mlog synchronously in the do_log
call. This eliminates teh send_log vestigates completely. Either we are
a monitor and queue for ourselves immediately, or log sending is handled
by MonClient.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 18 May 2011 16:58:46 +0000 (09:58 -0700)]
logclient: send entries once per mon session
We have a lossless session with the monitor! Only send log entries once.
Otherwise, if the mon is down or something, we end up building up a HUGE
backlog of requests by resending the same messages over and over again.
To do this:
- keep track of which entire we've sent.
- reset when the session resets
- let the MonClient control when log entries are sent, and reset
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 18 May 2011 01:26:46 +0000 (18:26 -0700)]
page: redefine PAGE_* macros
Saw this on sid i386:
msg/SimpleMessenger.cc: In function 'void alloc_aligned_buffer(ceph::bufferlist&
, int, int)':
msg/SimpleMessenger.cc:1782:14: error: '__sysconf' was not declared in this scop
e
msg/SimpleMessenger.cc:1789:23: error: '__sysconf' was not declared in this scop
Some header is clobbering out PAGE_* macros. Make our header more
forceful.
Sage Weil [Wed, 18 May 2011 04:29:33 +0000 (21:29 -0700)]
mds: do not shift to EXCL or MIX while rdlocked
There was an old change in file_eval() that was allowing us to switch from
SYNC to MIX or EXCL while there were rdlocks, which either caused lots of
lock thrashing or could (I think) hang things up completely. This was
from ea10a672, an ancient fix for something related that appears to have
taken out the rdlocked check by accident.
In my tests (one writer, one stat-er), this took things from long stalls
(up to 20 seconds) to very responsive stats. Yay!
Fixes: #791 Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Josh Durgin [Wed, 18 May 2011 00:36:39 +0000 (17:36 -0700)]
PG: update same_acting_since when acting or up changes
This is a hack since we currently use same_up_since to denote the beginning of an interval.
We should probably change this usaged or rename it to same_interval since.
Sage Weil [Tue, 17 May 2011 17:10:45 +0000 (10:10 -0700)]
msgr: avoid clearing connection_state on pipe replacement
read_message and write_message both dereference connection-state, so avoid
clearing it when replacing a pipe.
read_message still uses it to find rx_buffers in ways that may interfere
when two Pipes reference the connection, but currently that is only used
for lossy pipes. We could still take pipe_lock in that case, but it is
only an optimization (we copy the data if the buffers don't get used
directly) and probably not worth bothering with.
Sage Weil [Mon, 16 May 2011 21:47:29 +0000 (14:47 -0700)]
client: update ctime for auth, xattr
This mirrors the kclient fix in d8672d64. The client can have a newer
ctime due to auth or xattr excl caps. This fixes cases where ctime goes
backwards due to the right sequence of local operations and replies
from the MDS.
Sage Weil [Fri, 13 May 2011 20:01:52 +0000 (13:01 -0700)]
osd: lazily close connections to down peers
If we hear from a peer that should be dead, tell them, but mark our
connection so that it will close after that message is delivered or if
it encounters any errors.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Fri, 13 May 2011 20:01:08 +0000 (13:01 -0700)]
msgr: mark_down_on_empty and mark_disposable
Mark a connection to close when messages are sent, and to close on any
error. We can use this to tell people who should be dead that they should
be dead, but not waste resources reconnecting to them.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Samuel Just [Sat, 14 May 2011 00:30:50 +0000 (17:30 -0700)]
PG: Only pull the master log from a member of the prior_set
There must be a member of the prior_set such that no other
osd has a more recent last_update. This way, prior_set_affected
will ensure that we reset peering if the master log source
goes down.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Need to do this to get librgw to be usable as a standalone library
without unresolved symbols. Also, this makes it consistent with the rest
of the log level settings.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
libcommon depends on this file, and there's no other library that it
could go in. It is certainly silly to manually include it in every
application and library that uses libcommon.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>