Commit Graph

33318 Commits

Author SHA1 Message Date
Danny Al-Gaaf
a5e0d802e4 monmaptool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:21:08 +02:00
Danny Al-Gaaf
537385cc16 ceph_osdomap_tool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:17:40 +02:00
Danny Al-Gaaf
d57561a8b7 ceph_monstore_tool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:15:25 +02:00
Danny Al-Gaaf
e2e3d1d074 ceph_filestore_tool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:14:44 +02:00
Danny Al-Gaaf
ea6df887ea ceph_kvstore_tool.cc: cleanup includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:12:56 +02:00
Danny Al-Gaaf
8620609884 ceph_filestore_dump.cc: cleanup includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:12:15 +02:00
Danny Al-Gaaf
16e86aef79 mon_store_converter.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:03:35 +02:00
Danny Al-Gaaf
2c33ace302 dupstore.cc: remove not needed include of <iostream>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:03:02 +02:00
Danny Al-Gaaf
b1f4cd45fc rest_bench.cc: remove not needed includes, re-order includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:02:20 +02:00
Danny Al-Gaaf
bc166f3a28 psim.cc: remove not used includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:56:33 +02:00
Danny Al-Gaaf
de252c11f5 scratchtool.c: remove not needed include of <pthread.h>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:55:59 +02:00
Danny Al-Gaaf
4da889458c radosacl.cc: remove include of <iostream>, re-order includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:55:36 +02:00
Danny Al-Gaaf
24a047eca6 ceph_conf.cc: cleanup includes, remove not needed headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:53:36 +02:00
Danny Al-Gaaf
c0dcd231e9 ceph_authtool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:53:07 +02:00
Danny Al-Gaaf
e2b4d4175f ceph_monstore_tool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
8ab3232ab6 rgw_admin.cc: remove twice included header, resort includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
ddb9ce0e2f MDSMonitor.cc: remove twice included header, resorted includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
a8a2b56437 AuthMonitor.cc: remove twice included header, resorted includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
71b340a0fd ceph_osdomap_tool.cc: remove some twice included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
e66aec6eed ceph_monstore_tool.cc: remove twice included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Gregory Farnum
523619b0e5 Merge pull request #1532 from ceph/wip-fast-dispatch
fast dispatch
This series adds an ms_fast_dispatch interface to the Messenger/Dispatcher, designed so that you can dispatch messages directly from the Pipe threads without going through the Dispatch queue.
It also sets the OSD to make use of this interface for most operations, and switches to finer-grained locking and use of local data in a bunch of different paths to enable that.

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-06 23:06:14 -07:00
Greg Farnum
5e5a0867b1 Merge remote-tracking branch 'origin/master' into wip-fast-dispatch
Conflicts:
	src/osd/OSD.cc
2014-05-06 22:23:06 -07:00
Sage Weil
b7134c9a2e Merge pull request #1774 from ceph/wip-8296
osd/ReplicatedPG: fix whiteouts for other cache mode

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-06 13:08:39 -07:00
Greg Farnum
2d5d3097c3 Pipe: wait for Pipes to finish running, instead of just stop()ing them
Add a stop_and_wait() function that, in addition to closing the Pipe and killing
its socket, waits for any fast_dispatch call which is in-progress. Use this in
several parts of the Pipe and SimpleMessenger code where appropriate.

This fixes several races with fast_dispatch and other avenues; here are two:
1) It could be that we grab the lock while the existing pipe is fast_dispatching
and then proceed to dispatch messages ourself, beating it. Instead, wait for
the other pipe. Add a "reader_dispatching" member which tells bus this is
happening, and when re-locking, signal the cond if we're shutting down.

2) It could be that a normally-dispatched Message in the OSD triggers a
mark_down() on the Connection and then clears out the Session
(Connection::priv) pointer, causing a racing fast_dispatch()'ed function to
assert out in the OSD because it requires a valid Session.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-06 11:39:34 -07:00
Sage Weil
3e387d62ed osd/ReplicatedPG: fix whiteouts for other cache mode
We were special casing WRITEBACK mode for handling whiteouts; this needs to
also include the FORWARD and READONLY modes.  To avoid having to list
specific cache modes, though, just check != NONE.

Fixes: #8296
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-06 11:01:27 -07:00
Samuel Just
650051cd17 Merge pull request #1601 from ceph/wip-7576
osd: prevent pg map epochs from lagging too far behind

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-06 10:49:46 -07:00
Josh Durgin
2b48e52c4c Merge pull request #1748 from onlyjob/docs
sample.ceph.conf update:

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-06 10:12:45 -07:00
Josh Durgin
9c0e92f0ea Merge pull request #1653 from ceph/wip-7499
rgw, radosgw-admin: bucket link uses bucket instance id now

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-06 10:10:59 -07:00
Sage Weil
f31e3ee00a Merge pull request #1768 from daniel-j-h/code_quality
Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-06 07:12:00 -07:00
Sage Weil
e65a9da93a Revert "Fix installation into user home directory, broken by d3f0c0b"
This reverts commit 7539281037.

This breaks mount.fuse.ceph installation.
2014-05-06 07:04:56 -07:00
John Wilkins
cdbbf86fa3 doc: Fixed artifacts from merge.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-06 03:54:45 -07:00
John Wilkins
a31b9e9c75 doc: Added sudo to setenforce. Restored merge artifact.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-06 03:54:08 -07:00
John Wilkins
515827223f doc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-06 03:53:03 -07:00
Daniel J. Hofmann
08a4e88897 Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>
Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
2014-05-06 09:51:37 +02:00
Sage Weil
38408f6b68 Merge pull request #1770 from ceph/wip-8290
client: check snap_caps in Incode::is_any_caps()

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-05 16:55:49 -07:00
Yan, Zheng
ae434a3536 client: check snap_caps in Incode::is_any_caps()
Fixes: #8290
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-06 07:46:12 +08:00
Sage Weil
7f3a4206a3 Merge pull request #1764 from eile/master
Fix installation into user home directory, broken by d3f0c0b

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-05 16:26:27 -07:00
Greg Farnum
4bf20afcf8 SimpleMessenger: Don't grab the lock when sending messages if we don't have to
We'd like it if sending a message didn't require any global locks, but the
submit_message() function conditionally needs it in order to create new
Pipes. So:
1) When failing on a dud Pipe, verify that it's still the Pipe the Connection
is linked to; if not, try sending along the newly-linked Pipe.
2) Add an "already_locked" param to submit_message
3) Have the Connection-based interface set this param to false, and
the addr-based interface set it to true, reflecting whether they have
taken the SimpleMessenger::lock.
4) If we discover we need to reference global data structures in
submit_mesage:
  4a) if locked, do as we previously have
  4b) if not locked, take the lock and call into submit_message again.

The net effect of this is that in the typical case, the Connection-based
_send_message() function no longer acquires global locks, only per-Connection
ones. In the case where the Connection must recreate a Pipe, it falls back to
performing like the addr-based _send_message() does. In the case where
we are racing with somebody else recreating a Pipe(either us or the other
end), we may try twice but we will still only take per-Connection/Pipe locks,
which is a fair tradeoff for not taking the global lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-05 15:29:21 -07:00
Greg Farnum
b038f0c504 OSD: rename share_map_incoming and share_map_outgoing
share_map_incoming -> share_map
share_map_outgoing -> share_map_peer

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:21 -07:00
Greg Farnum
e1277ba6b3 OSD: move the peer_epoch and map sharing infrastructure into OSDService
None of this code requires OSD-internal data or acquring locks from
anybody else.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:21 -07:00
Greg Farnum
938feb49bd OSD: move the {boot,up,bind} epochs into OSDService
Provide interfaces around setting and retrieving them, instead of accessing
them directly with a lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
2ec92c7602 OSD: scan for dropped PGs in consume_map instead of advance_map
We have to wait until after we know that nobody will be adding ops for
newly-dead PGs to the list. While we're moving it, switch the locking
so we only hold a write lock while deleting the actual lists.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
fccf1c7010 OSD: do not take the pre_publish_lock in connection utility functions
They loop back around for local connections and deadlock, so we use the
map reservation mechanism instead.
TODO: actually that issue is out of date, do we still want this change?

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
fd2b57eac0 OSD: enable ms_fast_dispatch
We've been setting it up, now this patch actually adds a fast path for osd ops
which bypasses the osd_lock and should not block on any longly held locks. In
addition to the actual ms_fast_dispatch; we take advantage of the fast_notify
functions in order to create a Session for every peer, since that is now the
data structure around which we handle incoming Messages and waitlisting; and
fast_preprocess in order to track when a peer has already sent us a new map
(otherwise, if we see an op with a too-new epoch, we have to request it from
the monitor).

Signed-off-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
62b2d43acb OSD: remove dead comment
enqueue_op no longer requires holding the osd_lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
9028f95e54 OSD: Juggle the locking when resurrecting a PG
Don't hold the old PG's lock in _create_lock_pg. Instead, just copy the
necessary data bits into a holding location. Note that this means we aren't
protecting it against change while the new PG is created, which I *think*
is okay...

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:20 -07:00
Greg Farnum
5268e51b79 OSD: don't share_map_incoming() directly from handle_replica_op()
Let the op_tp handle it, or our C_SendMap callback in the op_gen_wq.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:19 -07:00
Greg Farnum
ebdc097047 OSD: use the async workqueue to send OSDMap updates on dropped ops
Check whether we actually want to send a map in-line, and if we do, create
a GenContext which does so and put that in the op_gen_wq.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:19 -07:00
Greg Farnum
6c98e36f89 OSD: add an op threadpool GenContext workqueue
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:19 -07:00
Greg Farnum
9fba69a11a OSD: allow build_incremental_map_msg to fail on lookups
Since we're now building incremental map messages out-of-band with doing
other map updates now, we need to tolerate lookup failures at the bottom
end. Do so by returning a NULL message in that case.
Handle that in send_incremental_map by looping until we get a
message back -- if we fail on the first attempt, we'll get
the OSDSuperblock again and deal with it.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-05 15:29:19 -07:00