]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agoosd: new encoding for PG::Interval
Sage Weil [Thu, 2 Feb 2012 21:15:55 +0000 (13:15 -0800)]
osd: new encoding for PG::Interval

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for PG::OndiskLog
Sage Weil [Thu, 2 Feb 2012 21:15:29 +0000 (13:15 -0800)]
osd: new encoding for PG::OndiskLog

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoobjectstore: new encoding for Transaction
Sage Weil [Thu, 2 Feb 2012 21:15:14 +0000 (13:15 -0800)]
objectstore: new encoding for Transaction

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for ScrubMap
Sage Weil [Thu, 2 Feb 2012 20:44:13 +0000 (12:44 -0800)]
osd: new encoding for ScrubMap

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for object_info_t
Sage Weil [Thu, 2 Feb 2012 20:44:04 +0000 (12:44 -0800)]
osd: new encoding for object_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for watch_info_t
Sage Weil [Thu, 2 Feb 2012 20:43:38 +0000 (12:43 -0800)]
osd: new encoding for watch_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for SnapSet
Sage Weil [Thu, 2 Feb 2012 20:43:26 +0000 (12:43 -0800)]
osd: new encoding for SnapSet

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_missing_t
Sage Weil [Thu, 2 Feb 2012 20:42:59 +0000 (12:42 -0800)]
osd: new encoding for pg_missing_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_log_t
Sage Weil [Thu, 2 Feb 2012 20:42:47 +0000 (12:42 -0800)]
osd: new encoding for pg_log_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_log_entry_t
Sage Weil [Thu, 2 Feb 2012 20:42:30 +0000 (12:42 -0800)]
osd: new encoding for pg_log_entry_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_history_t
Sage Weil [Thu, 2 Feb 2012 20:42:07 +0000 (12:42 -0800)]
osd: new encoding for pg_history_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_history_t
Sage Weil [Thu, 2 Feb 2012 20:41:41 +0000 (12:41 -0800)]
osd: new encoding for pg_history_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pool_stat_t
Sage Weil [Thu, 2 Feb 2012 20:40:56 +0000 (12:40 -0800)]
osd: new encoding for pool_stat_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_stat_t
Sage Weil [Thu, 2 Feb 2012 20:40:23 +0000 (12:40 -0800)]
osd: new encoding for pg_stat_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for object_stat_collection_t
Sage Weil [Thu, 2 Feb 2012 20:39:55 +0000 (12:39 -0800)]
osd: new encoding for object_stat_collection_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for object_stat_sum_t
Sage Weil [Thu, 2 Feb 2012 19:39:37 +0000 (11:39 -0800)]
osd: new encoding for object_stat_sum_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pg_pool_t
Sage Weil [Thu, 2 Feb 2012 19:36:43 +0000 (11:36 -0800)]
osd: new encoding for pg_pool_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for pool_snap_info_t
Sage Weil [Thu, 2 Feb 2012 19:35:31 +0000 (11:35 -0800)]
osd: new encoding for pool_snap_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: new encoding for OSDSuperblock
Sage Weil [Thu, 2 Feb 2012 19:34:20 +0000 (11:34 -0800)]
osd: new encoding for OSDSuperblock

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: move object_locator_t to osd_types.{h,cc}
Sage Weil [Fri, 10 Feb 2012 05:45:00 +0000 (21:45 -0800)]
osd: move object_locator_t to osd_types.{h,cc}

That's a better home.  Also add to ceph-dencoder.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: add osd_reqid_t
Sage Weil [Fri, 10 Feb 2012 05:35:39 +0000 (21:35 -0800)]
ceph-dencoder: add osd_reqid_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: add hobject_t
Sage Weil [Fri, 10 Feb 2012 05:30:16 +0000 (21:30 -0800)]
ceph-dencoder: add hobject_t

Move to a separate file in os/, since this is an ObjectStore related
object.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: add/use pg_create_t ctor
Sage Weil [Fri, 10 Feb 2012 05:17:55 +0000 (21:17 -0800)]
mon: add/use pg_create_t ctor

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph-dencoder: add pg_create_t (formerly MOSDPGCreate::create_rec)
Sage Weil [Fri, 10 Feb 2012 05:15:53 +0000 (21:15 -0800)]
ceph-dencoder: add pg_create_t (formerly MOSDPGCreate::create_rec)

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agotest/encoding/readable.sh: no \t
Sage Weil [Fri, 10 Feb 2012 01:20:18 +0000 (17:20 -0800)]
test/encoding/readable.sh: no \t

Not sure why this sometimes works and sometimes doesn't.  Maybe it's a
bashism?

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'wip-corpus'
Sage Weil [Fri, 10 Feb 2012 00:47:15 +0000 (16:47 -0800)]
Merge branch 'wip-corpus'

13 years agoceph-dencoder: add Log{Entry,EntryKey,Summary}
Sage Weil [Fri, 10 Feb 2012 00:44:39 +0000 (16:44 -0800)]
ceph-dencoder: add Log{Entry,EntryKey,Summary}

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agofilestore: wait to start op if other ops are in line
Sage Weil [Fri, 10 Feb 2012 00:20:31 +0000 (16:20 -0800)]
filestore: wait to start op if other ops are in line

We can have a sequence like:

- commit_start, blocked=true
- op_start thread A gets in line
- op_start thread B gets in line
- commit finished, blocked=false
- thread A goes
- op_start thread C sees blocked=false and continues
-> order broken

If there are people in line from a previous block, we need to get in line,
even if blocked == false.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agofilestore: fix op queue quiesce during commit
Sage Weil [Thu, 9 Feb 2012 19:23:10 +0000 (11:23 -0800)]
filestore: fix op queue quiesce during commit

When I added the ordering constraint fix back in 259c509a I got the
check backwards.  We want to wait if we are blocked OR we are not in the
front of the line (i.e., proceed if we are not blocked AND first in line).

Fixes: #2046
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote branch 'gh/wip-types'
Sage Weil [Thu, 9 Feb 2012 05:05:39 +0000 (21:05 -0800)]
Merge remote branch 'gh/wip-types'

13 years agoMerge remote branch 'gh/wip-stuck-in-backfill'
Sage Weil [Thu, 9 Feb 2012 04:43:53 +0000 (20:43 -0800)]
Merge remote branch 'gh/wip-stuck-in-backfill'

Reviewed-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoReplicatedPG: don't count deletions as ops
Josh Durgin [Thu, 9 Feb 2012 01:38:52 +0000 (17:38 -0800)]
ReplicatedPG: don't count deletions as ops

Counting them as ops but not requeueing the pg for recovery causes
backfill to stall when only deletions are sent in
recover_backfill(). Deletions are cheap and don't need to be acked, so
we can simply stop counting them as ops.

Fixes: #2044
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoosd: don't remove pg from recovery queue if not enough recovery ops started
Josh Durgin [Wed, 8 Feb 2012 23:38:20 +0000 (15:38 -0800)]
osd: don't remove pg from recovery queue if not enough recovery ops started

The pg has already been dequeued at the beginning of do_recovery(),
and it requeues itself only if it starts a new recovery op.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agorgw: don't treat plus as a space in url decode
Yehuda Sadeh [Thu, 9 Feb 2012 01:08:39 +0000 (17:08 -0800)]
rgw: don't treat plus as a space in url decode

Any special character encoding should be done through %hex. The
plus sign is a valid character in object names, and in user id
(when used in signed urls).

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoosd: discard waiting ops when pg mapping changes
Sage Weil [Thu, 9 Feb 2012 00:19:30 +0000 (16:19 -0800)]
osd: discard waiting ops when pg mapping changes

If the pg mapping changes away from us, we can safely discard messages we
have waiting for the PG to be created.

Fixes: #2013
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoosd: flush on activate
Sage Weil [Wed, 8 Feb 2012 19:20:47 +0000 (11:20 -0800)]
osd: flush on activate

PG::activate() can make lots of changes, most notably clean_up_local()
which deletes lots of local objects.  Those changes need to be flushed
to the fs before we start servicing requests or else we risk processing a
client read on those objects.

Fixes: #1974
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMakefile: check readability of object corpus on 'make check'
Sage Weil [Fri, 3 Feb 2012 18:02:06 +0000 (10:02 -0800)]
Makefile: check readability of object corpus on 'make check'

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoadd ceph-object-corpus.git submodule
Sage Weil [Fri, 3 Feb 2012 17:59:53 +0000 (09:59 -0800)]
add ceph-object-corpus.git submodule

13 years agomon: fix [near]full_ratio conf update
Sage Weil [Wed, 8 Feb 2012 04:16:43 +0000 (20:16 -0800)]
mon: fix [near]full_ratio conf update

Already a value in [0,1].  Interpret as a percentage if > 1.0.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: better MonCaps test cases
Sage Weil [Tue, 7 Feb 2012 23:43:44 +0000 (15:43 -0800)]
mon: better MonCaps test cases

Move MonCaps to libcommon.la.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph-dencoder: MonCap[s]
Sage Weil [Tue, 7 Feb 2012 19:44:40 +0000 (11:44 -0800)]
ceph-dencoder: MonCap[s]

Need some better test instances for MonCaps...

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: fix PGMap::generate_test_instances()
Sage Weil [Tue, 7 Feb 2012 17:16:54 +0000 (09:16 -0800)]
mon: fix PGMap::generate_test_instances()

Apply an incremental instead of futzing directly with members.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: refactor calc_stats()
Sage Weil [Tue, 7 Feb 2012 17:16:30 +0000 (09:16 -0800)]
mon: refactor calc_stats()

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: is_zero() method for stat structs
Sage Weil [Tue, 7 Feb 2012 17:30:02 +0000 (09:30 -0800)]
osd: is_zero() method for stat structs

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: fix ScrubMap::object ctor
Sage Weil [Tue, 7 Feb 2012 17:33:54 +0000 (09:33 -0800)]
osd: fix ScrubMap::object ctor

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: make [near]full_ratio config options floats
Sage Weil [Tue, 7 Feb 2012 17:04:37 +0000 (09:04 -0800)]
mon: make [near]full_ratio config options floats

ratio implies a real number, not a percentage.  Correct, though, if it is
> 1.0.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: initialize [near]full_ratio during create_initial(), not ctor
Sage Weil [Tue, 7 Feb 2012 17:02:51 +0000 (09:02 -0800)]
mon: initialize [near]full_ratio during create_initial(), not ctor

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph-dencoder: MonMap
Sage Weil [Mon, 6 Feb 2012 23:50:50 +0000 (15:50 -0800)]
ceph-dencoder: MonMap

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: uninline Monmap encode/decode
Sage Weil [Mon, 6 Feb 2012 23:13:26 +0000 (15:13 -0800)]
mon: uninline Monmap encode/decode

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph-dencoder: PGMap[::Incremental]
Sage Weil [Mon, 6 Feb 2012 23:10:21 +0000 (15:10 -0800)]
ceph-dencoder: PGMap[::Incremental]

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoupdate amazonaws xmlns to correct url
michael rodriguez [Wed, 8 Feb 2012 04:07:21 +0000 (20:07 -0800)]
update amazonaws xmlns to correct url

Signed-off-by: michael rodriguez <michael@newdream.net>
13 years agomds: remove IntervalTree code
Sage Weil [Wed, 8 Feb 2012 06:07:46 +0000 (22:07 -0800)]
mds: remove IntervalTree code

Not used, not tested.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotrivial_libceph: need O_RDWR
Sage Weil [Wed, 8 Feb 2012 05:56:51 +0000 (21:56 -0800)]
trivial_libceph: need O_RDWR

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: -EINVAL write if not opened writable
Sage Weil [Wed, 8 Feb 2012 05:36:53 +0000 (21:36 -0800)]
client: -EINVAL write if not opened writable

Fixes: #1827
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: clean up ctor a bit
Sage Weil [Wed, 8 Feb 2012 05:31:29 +0000 (21:31 -0800)]
client: clean up ctor a bit

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: initialize initialized
Sage Weil [Wed, 8 Feb 2012 05:28:46 +0000 (21:28 -0800)]
client: initialize initialized

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: always send scrub errors to cluster log
Sage Weil [Mon, 6 Feb 2012 04:39:49 +0000 (20:39 -0800)]
osd: always send scrub errors to cluster log

Some errors were going to the cluster log, some weren't.  Normalize the
output format and send them all.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: drop election messages with bad rank
Sage Weil [Tue, 7 Feb 2012 22:18:52 +0000 (14:18 -0800)]
mon: drop election messages with bad rank

The bad message came from old code pre-bfbeae68c045de76ede86ca4f72d2a760a19c84b.

Fixes: #1909
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: cleanup url_decode usage
Yehuda Sadeh [Tue, 7 Feb 2012 00:07:13 +0000 (16:07 -0800)]
rgw: cleanup url_decode usage

we now url_decode the relevant strings at initialization,
thus it's clear whether we need to url_decode or not later on.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agorgw: url_decode object name
Yehuda Sadeh [Mon, 6 Feb 2012 22:57:26 +0000 (14:57 -0800)]
rgw: url_decode object name

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoosd: re-take the osd lock in the init error path where it's not held
Josh Durgin [Mon, 6 Feb 2012 23:18:11 +0000 (15:18 -0800)]
osd: re-take the osd lock in the init error path where it's not held

The Mutex::Locker will unlock it once the function exits.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoceph-dencoder: ScrubMap[::object]
Sage Weil [Mon, 6 Feb 2012 21:29:23 +0000 (13:29 -0800)]
ceph-dencoder: ScrubMap[::object]

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: uninline osd_stat_t methods
Sage Weil [Mon, 6 Feb 2012 06:24:18 +0000 (22:24 -0800)]
osd: uninline osd_stat_t methods

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: coll_t
Sage Weil [Mon, 6 Feb 2012 06:22:51 +0000 (22:22 -0800)]
ceph-dencoder: coll_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: pg_t
Sage Weil [Mon, 6 Feb 2012 06:20:51 +0000 (22:20 -0800)]
ceph-dencoder: pg_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: SnapSet
Sage Weil [Mon, 6 Feb 2012 06:18:51 +0000 (22:18 -0800)]
ceph-dencoder: SnapSet

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: SnapContext, SnapRealmInfo
Sage Weil [Mon, 6 Feb 2012 05:53:53 +0000 (21:53 -0800)]
ceph-dencoder: SnapContext, SnapRealmInfo

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomove SnapContext, SnapRealmInfo to common/snap_types.{h,cc}
Sage Weil [Mon, 6 Feb 2012 05:51:33 +0000 (21:51 -0800)]
move SnapContext, SnapRealmInfo to common/snap_types.{h,cc}

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: filepath
Sage Weil [Mon, 6 Feb 2012 05:28:17 +0000 (21:28 -0800)]
ceph-dencoder: filepath

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: CompatSet
Sage Weil [Mon, 6 Feb 2012 05:28:11 +0000 (21:28 -0800)]
ceph-dencoder: CompatSet

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agokill unused tstring
Sage Weil [Mon, 6 Feb 2012 05:21:46 +0000 (21:21 -0800)]
kill unused tstring

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agokill useless [cn]string.h
Sage Weil [Mon, 6 Feb 2012 05:19:43 +0000 (21:19 -0800)]
kill useless [cn]string.h

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: escape and list correctly objects that start with underscore
Yehuda Sadeh [Mon, 6 Feb 2012 21:12:58 +0000 (13:12 -0800)]
rgw: escape and list correctly objects that start with underscore

This should fix bug #2025.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agocrush: don't BUG_ON
Sage Weil [Mon, 6 Feb 2012 18:36:12 +0000 (10:36 -0800)]
crush: don't BUG_ON

Fail gracefully on map errors; only BUG on code errors.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocrush: don't BUG_ON within crush_choose
Alexandre Oliva [Mon, 6 Feb 2012 18:32:53 +0000 (10:32 -0800)]
crush: don't BUG_ON within crush_choose

It's very hard to recover from an invalid crushmap if mons fail
assertions while processing the map, and osds crash while advancing
past an already-fixed map.  Skip such broken rules instead of
aborting.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13 years agoclient: init/shutdown objecter in init/shutdown
Sage Weil [Sat, 4 Feb 2012 21:25:40 +0000 (13:25 -0800)]
client: init/shutdown objecter in init/shutdown

Not in mount/unmount, and don't do shutdown() twice!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: show full status in ceph health
Josh Durgin [Fri, 3 Feb 2012 02:52:16 +0000 (18:52 -0800)]
mon: show full status in ceph health

HEALTH_WARN when nearfull, HEALTH_ERROR when full.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: signal dispatch_cond on ms_dispatch completion
Sage Weil [Fri, 3 Feb 2012 17:27:55 +0000 (09:27 -0800)]
osd: signal dispatch_cond on ms_dispatch completion

There may be another dispatch thread waiting on this cond; we do need to
signal it!

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: use request uri if script name is empty
Yehuda Sadeh [Fri, 3 Feb 2012 17:32:14 +0000 (09:32 -0800)]
rgw: use request uri if script name is empty

this was required for some nginx configuration

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoosd: reorder PG recovery_state initialization
Sage Weil [Fri, 3 Feb 2012 17:27:47 +0000 (09:27 -0800)]
osd: reorder PG recovery_state initialization

The state machine state constructors print stuff to the logs, and the
PG::gen_prefix() includes all kinds of PG fields in that.  Move the
recovery_state member to the end of the class so that all previous fields
are initialized when that happens.  This makes valgrind shut up.

Some more deliberate tidying of the PG members and methods would also
be nice...

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: nicer output
Sage Weil [Fri, 3 Feb 2012 05:06:10 +0000 (21:06 -0800)]
test/encoding/readable.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: more helpful error message for messages
Sage Weil [Fri, 3 Feb 2012 05:05:37 +0000 (21:05 -0800)]
ceph-dencoder: more helpful error message for messages

If the type doesn't match, share what it was vs what you expected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomessages: set type in default constructor
Sage Weil [Fri, 3 Feb 2012 05:03:08 +0000 (21:03 -0800)]
messages: set type in default constructor

ceph-dencoder wants this to verify it decoded the correct message type.
Not that it is likely to happen, but let's be pendantic about it anyway.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agopick object from random osd for primary recovery
Alexandre Oliva [Thu, 2 Feb 2012 19:41:46 +0000 (17:41 -0200)]
pick object from random osd for primary recovery

When recovering a primary, try the osds that have a copy of the object
in random order, rather than preferring the lowest-numbered.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Suggested-by: Samuel Just <samuel.just@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomsg: fix message leak on receipt of undecodable message
Sage Weil [Thu, 2 Feb 2012 22:30:53 +0000 (14:30 -0800)]
msg: fix message leak on receipt of undecodable message

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMakefile: add test/encoding/types.h
Sage Weil [Fri, 3 Feb 2012 01:01:08 +0000 (17:01 -0800)]
Makefile: add test/encoding/types.h

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge branch 'wip-encoding'
Sage Weil [Fri, 3 Feb 2012 01:00:38 +0000 (17:00 -0800)]
Merge branch 'wip-encoding'

Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
Conflicts:
src/msg/Message.h
src/osd/OSD.cc
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

13 years agoencoding: document ENCODE/DECODE macros
Sage Weil [Thu, 2 Feb 2012 22:23:16 +0000 (14:23 -0800)]
encoding: document ENCODE/DECODE macros

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: nicer output
Sage Weil [Thu, 2 Feb 2012 22:04:03 +0000 (14:04 -0800)]
test/encoding/readable.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: check all version
Sage Weil [Thu, 2 Feb 2012 21:56:55 +0000 (13:56 -0800)]
test/encoding/readable.sh: check all version

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix another repop->ctx->op deref
Sage Weil [Thu, 2 Feb 2012 23:20:14 +0000 (15:20 -0800)]
osd: fix another repop->ctx->op deref

Ok this time I actually looked for more and didn't see any.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote branch 'gh/wip-objecter-initialized'
Sage Weil [Thu, 2 Feb 2012 23:16:02 +0000 (15:16 -0800)]
Merge remote branch 'gh/wip-objecter-initialized'

Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoosd: avoid null deref of repop->ctx->op
Sage Weil [Thu, 2 Feb 2012 23:07:54 +0000 (15:07 -0800)]
osd: avoid null deref of repop->ctx->op

It's optional.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoencoding: document ENCODE_DUMP throttling weirdness
Sage Weil [Thu, 2 Feb 2012 21:48:26 +0000 (13:48 -0800)]
encoding: document ENCODE_DUMP throttling weirdness

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoencoding: fix DECODE_START macro
Sage Weil [Thu, 2 Feb 2012 21:37:34 +0000 (13:37 -0800)]
encoding: fix DECODE_START macro

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoencoding: add DECODE_OLDEST macro
Sage Weil [Thu, 2 Feb 2012 21:36:45 +0000 (13:36 -0800)]
encoding: add DECODE_OLDEST macro

So we can (gracefully) fail to decode very old encoded versions we no
longer support.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix another issue_repop() ctx->op null deref
Sage Weil [Thu, 2 Feb 2012 21:31:58 +0000 (13:31 -0800)]
osd: fix another issue_repop() ctx->op null deref

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocheck-generated.sh: do self-decode test first
Sage Weil [Thu, 2 Feb 2012 20:50:04 +0000 (12:50 -0800)]
check-generated.sh: do self-decode test first

This way we get a helpful error instead of silent failure on later.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agocheck-generated.sh: nicer output
Sage Weil [Thu, 2 Feb 2012 20:47:58 +0000 (12:47 -0800)]
check-generated.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: print errors to stderr
Sage Weil [Thu, 2 Feb 2012 20:39:35 +0000 (12:39 -0800)]
ceph-dencoder: print errors to stderr

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>