Commit Graph

15147 Commits

Author SHA1 Message Date
Yehuda Sadeh
6ddee81eb5 librbd: fix and cleanup a bit read_iterate 2011-06-21 22:45:11 -07:00
Yehuda Sadeh
bfe0d55c8f librbd: sparse read cleanup, fixes 2011-06-21 22:43:07 -07:00
Yehuda Sadeh
e4f7d8e199 librbd: fix and cleanup a bit read_iterate 2011-06-21 22:43:07 -07:00
Yehuda Sadeh
52e6e85203 rgw: some cleanups 2011-06-21 22:43:06 -07:00
Sage Weil
6725e748e9 qa: simple rbd import/export test
Fixes: #1211
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 20:31:00 -07:00
Colin Patrick McCabe
9761810cd1 Objecter.cc: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 17:05:47 -07:00
Colin Patrick McCabe
df2e3bcb2a initialize g_ceph_context in common_preinit
Initialize g_ceph_context in common_preinit rather than in a global
constructor.

Add comments to all of the major initialization functions.

We still set globals in common_preinit, for the time being.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 16:23:37 -07:00
Colin Patrick McCabe
a66d026470 CephContext: not copyable
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 16:16:09 -07:00
Sage Weil
74e5c390e2 make misc items as not copyable
These structures are all not copyable.  Make sure we get a link error if
we try.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:58:59 -07:00
Sage Weil
4e244f2ae5 [dex]list: not copyable
The list items are embedded in other structures; copying the list will lead
to duplicated references and other badness.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:57:58 -07:00
Sage Weil
d3d115964f msgr: avoid copying Pipe* xlist
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:57:46 -07:00
Sage Weil
bdb7991c29 Merge branch 'stable' into next
Conflicts:
	src/osd/OSD.cc
2011-06-21 15:54:54 -07:00
Sage Weil
ce6f5788c2 mds: make avoid copying sessionmap by_state xlist
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:54:34 -07:00
Sage Weil
f94e2ab61a osd: do misdirected request checks before pg active test
We can process+discard a misdirected or invalid request without the pg
being active.  Reorder a few other checks too.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-21 15:54:13 -07:00
Sage Weil
c17d9c0bc1 mds: avoid copying snap client_caps xlist
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:53:53 -07:00
Sage Weil
cdb500e530 mon: do not copy subscription xlist
xlist is not copyable.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:53:50 -07:00
Sage Weil
abafef3bcd qa: clean up after snaptest-multiple-capsnaps.sh
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 15:52:46 -07:00
Colin Patrick McCabe
0763221b54 Dispatcher: prevent copying
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 15:46:42 -07:00
Sage Weil
2e7d06c6a3 msgr: only SO_REUSEADDR when specific port is specified
In general SO_REUSEADDR is slightly dangerous, but avoids waiting for the
timeout when restarting servers.  This is important when binding to a
specific port.

When binding to a random port, it doesn't matter.  Also, it appears that
two processes can bind() to the same port with that flag set, and then one
will fail with EADDRINUSE on listen().  That's racy when starting up
daemons that should be binding to unique/random ports.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-21 12:47:32 -07:00
Sage Weil
4c1cb28cb6 mon: fix log state trimming
We need to stash last_consumed in order for trimming to work.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-21 12:29:15 -07:00
Colin Patrick McCabe
282575a2c5 Merge branch 'wip-globalfoo' 2011-06-21 12:28:44 -07:00
Sage Weil
888e880caf mon: add 'log ....' command
Just sticks something in the central log.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-21 12:29:23 -07:00
Colin Patrick McCabe
112e569296 Convert g_ceph_context to a pointer.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 12:28:16 -07:00
Colin Patrick McCabe
89dca91635 gitignore: add test_libcommon_build
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 12:07:12 -07:00
Colin Patrick McCabe
1ef909971b inode_load_vec_t: de-globalize
Don't call ceph_clock_now from the constructor of inode_load_vec_t.
Update the classes that contain inode_load_vec_t to reflect this.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:40:20 -07:00
Colin Patrick McCabe
b02c8d6545 Create test_libcommon_build
Create test_libcommon_build to test for references to g_ceph_context and
other libglobal symbols from within libcommon.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:40:20 -07:00
Colin Patrick McCabe
b64a48b7ef DecayCounter: take a utime_t in ::decode
We need to initialize the last_decay time of the DecayCounter when
decoding it. This is not found in the encoded information, but instead
is set to the current time. We need to pass this in explicitly now
because of deglobalization.

This also reduces the number of calls to gettimeofday, which is good in
general.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:40:20 -07:00
Colin Patrick McCabe
209d1407fb Thread.cc: deglobalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:40:20 -07:00
Colin Patrick McCabe
fbf3f4ac2e common_init: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:40:20 -07:00
Yehuda Sadeh
c48540aec6 filestore: fix fiemap 2011-06-21 11:31:39 -07:00
Yehuda Sadeh
39e2c6e853 rbd: fix read_iterate for sparse read 2011-06-21 11:31:26 -07:00
Yehuda Sadeh
5ad52aff9c rgw: use adapting window for put obj 2011-06-21 11:22:47 -07:00
Colin Patrick McCabe
9e9cec694a AuthNone: encode entity name in authorizer
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-21 11:16:11 -07:00
Sage Weil
7f92d370a3 osd: warn instead of error if cluster addr specified but not public addr
Signed-off-by: Sage Weil <sage@newdream.net>
2011-06-21 09:51:22 -07:00
Colin Patrick McCabe
37a976222f include/atomic.h:fix build for non-atomic-ops case
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 22:40:28 -07:00
Yehuda Sadeh
8f1beb1b86 rgw: put data using a window 2011-06-20 17:09:55 -07:00
Colin Patrick McCabe
8147350c33 MDSMap: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
83020ad03f assert: de-globalize
Implement a simple registration system so that assert output can still
show up non-interleaved in daemons and utilities. Library code will just
use dout_emergency, which is simple and deadlock-free, but might be
interleaved with ongoing messages sometimes.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
fae8dde3e4 Messenger: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
4053204954 DoutStreambuf: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
2b22c32b1a OSDMap: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
f6c7343f75 auth: more deglobalization
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
4615913c74 hex.cc: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
d5ec8b77a4 MonClient: deglobalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:43 -07:00
Colin Patrick McCabe
dcc6448285 ProfLogger: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00
Colin Patrick McCabe
ba5b7331e7 tcp.cc: de-globalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00
Colin Patrick McCabe
0fc6ef2ef3 LogClient: remove accidental g_conf references
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00
Colin Patrick McCabe
ba61191021 msg: remove globals
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00
Colin Patrick McCabe
b0cb48083d KeyRing: derr -> lderr
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00
Colin Patrick McCabe
91065f4820 auth: AuthSupported: deglobalize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-06-20 16:41:42 -07:00