Commit Graph

12351 Commits

Author SHA1 Message Date
Sage Weil
7d33830af5 mds: set a writeable client range on regular files created via MKNOD
If the client reexports ceph via nfs, file creations come through as
a MKNOD followed by OPEN.  If it's a MKNOD on a normal file, assume that
the client will probably write to it and set them up with the caps and
client_range to do so without asking us again first.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
d64616b95b mds: set layout on files created by MKNOD instead of CREATE
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
7df469368d cephx: fix uninitialized value
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:02:45 -08:00
Sage Weil
3a235b0f21 filestore: make OpSequencer::flush() work for writeahead journaling items
It was only waiting for items in the op_queue to complete.  The goal is
to wait for anything we've called queue_transactions(&osr,...) on. If we
do writeahead journaling, though, there might be new ops that are still
journaling but not yet submitted to the fs that are missed.

This adds a journal queue to the OpSequencer, and uses it in the writeahead
case only.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 15:30:39 -08:00
Colin Patrick McCabe
285f351b72 mon: build_initial_monmap: fix mismatched alloc
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:31:41 -08:00
Colin Patrick McCabe
caa4609387 common: cleanups
common_init: avoid (mismatched) heap allocation

ConfFile::_parse: avoid memory leak on error path

ConfFile: NULL filename if not set, rather than leaving it undefined

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:26:37 -08:00
Colin Patrick McCabe
28bcf0bc98 osd: PG::choose_acting: fix major iterator mistake
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
f7dc1a9239 rgw: fix fd leak on error path
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
795811d66a hadoop: fix a bunch of mismatched allocations
Using array new means you need array delete.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
2f916086a6 auth: avoid mismatched allocation
Can't pair strdup and free.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Sage Weil
3c7d30f1ac osd: flush pg writes to disk before starting scrub scan
This avoids two races:
 - we just completed recovery by pushing objects to the replica, and the
   replica starts scanning before those writes reach the fs.
 - we just trimmed to something after last_update_applied.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 14:15:35 -08:00
Sage Weil
5184db4424 filestore: add per-sequencer flush operation
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 14:15:35 -08:00
Sage Weil
2fb60daf68 osd: debug scan_list and scrub a bit better
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 12:51:03 -08:00
Colin Patrick McCabe
c3a24fc5d3 osd: refactor _get_pool / _put_pool a little bit
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:28:23 -08:00
Colin Patrick McCabe
39aff22128 osd: OSD::_lookup_pool: avoid double lookup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:00:13 -08:00
Colin Patrick McCabe
bf4529b908 test: create test_pools.sh
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 11:52:01 -08:00
Sage Weil
1cfad2ea77 osd: clear INCONSISTENT if scrub detects no errors
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 10:59:45 -08:00
Sage Weil
b190875548 osd: add assert that we're replica
ar Fred saw a crash where we got into merge_log as a stray, which really
shouldn't ever happen!  See #590.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 10:36:34 -08:00
Laszlo Boszormenyi
1e291fc9ef debian: don't strip rados classes
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 08:31:00 -08:00
Laszlo Boszormenyi
9c173bb400 debian: rename ceph.lintian -> ceph.lintian-overrides
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 08:30:43 -08:00
Colin Patrick McCabe
b2746c94d0 logging: eliminate out-of-range dout calls
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>
2010-12-17 00:00:25 -08:00
Colin Patrick McCabe
c4b5c33b12 common: more cerr -> derr conversions
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>
2010-12-16 16:25:29 -08:00
Colin Patrick McCabe
30f752cd32 gceph,ceph: replace cerr->derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:57:35 -08:00
Colin Patrick McCabe
c76379fd56 cosd: replace cerr with derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:05:50 -08:00
Samuel Just
73669d87e6 PG.cc:
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>
2010-12-16 13:06:43 -08:00
Colin Patrick McCabe
4644247ce4 osd: FileJournal: use derr
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>
2010-12-16 10:32:47 -08:00
Colin Patrick McCabe
4fc1af5e60 logging: re-introduce derr
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>
2010-12-16 10:32:45 -08:00
Samuel Just
29480f42be ReplicatedPG.cc:
_scrub must set head when it encounters a head snap
	curclone counts down, not up

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
2010-12-15 17:23:59 -08:00
Yehuda Sadeh
c321620e3b osd: send notify message only to unexpired watchers 2010-12-15 16:33:42 -08:00
Yehuda Sadeh
1e490eff77 osd: timed out watcher is added to unconnected map 2010-12-15 16:33:42 -08:00
Colin Patrick McCabe
619b45ad0b logging: close file when reloading global config
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 16:26:49 -08:00
Yehuda Sadeh
060fd42810 osd: fix watch timer, locking 2010-12-15 15:23:08 -08:00
Sage Weil
914f6ddebd filestore: detect final version of async ioctl SNAP_CREATE_V2
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>
2010-12-15 13:39:57 -08:00
Greg Farnum
06a2d7a269 mds: Save straydn in mdr so it's consistent across retry attempts.
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>
2010-12-15 13:07:25 -08:00
Colin Patrick McCabe
e31f0a4783 tools: don't start msgr thread before daemonize
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>
2010-12-15 12:44:01 -08:00
Sage Weil
d54a854811 Merge branch 'objecter' into unstable 2010-12-15 11:02:19 -08:00
Sage Weil
530083cc32 objecter: check for pg mapping changes in each incremental; refactor misc resubmission code
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>
2010-12-15 11:02:09 -08:00
Sage Weil
32a8aed92a objecter: add reopen_session helper
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
f6dc5d9f92 objecter: cleanup: rename op maps
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
065cdf523e objecter: track pending requests by osd, not pg
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>
2010-12-15 11:02:09 -08:00
Sage Weil
07e593c4f3 mds: fix inode ancestor attr encoding
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Sage Weil
5d44d5993a msgr: mark down by Connection*
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Colin Patrick McCabe
fdbd85e4d2 automake: ignore rmdir errors during uninstall
We don't want to fail "make distcheck" for a silly reason.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 10:15:49 -08:00
Yehuda Sadeh
7b5e923cd0 osd: send pending notification for reconnected watcher 2010-12-14 17:00:49 -08:00
Colin Patrick McCabe
f9694648fc automake: add osd/Watch.h to noinst_HEADERS
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 16:28:39 -08:00
Sage Weil
89d5c91e7d mon: trim pgmap less aggressively
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>
2010-12-14 11:50:03 -08:00
Yehuda Sadeh
b989087ddf crypto: catch cryptopp decrypt/encrypt exceptions 2010-12-14 10:51:46 -08:00
Colin Patrick McCabe
3e076c397a logging: use Mutex::Locker
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>
2010-12-14 06:56:27 -08:00
Colin Patrick McCabe
bf31f3f129 logger: Fix DoutStreambuf::create_rank_symlink
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:20:23 -08:00
Colin Patrick McCabe
4c37719988 cephtool: rename tools files
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>
2010-12-14 06:13:50 -08:00