]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoosd/ReplicatedPG: set object_info and snapset xattrs on promote
Sage Weil [Wed, 23 Oct 2013 02:36:45 +0000 (19:36 -0700)]
osd/ReplicatedPG: set object_info and snapset xattrs on promote

For the normal write path, prepare_transaction() handles this for us.  In
this case, we need to do it explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: handle is_whiteout in do_osd_ops()
Sage Weil [Wed, 23 Oct 2013 01:06:41 +0000 (18:06 -0700)]
osd/ReplicatedPG: handle is_whiteout in do_osd_ops()

Most of the time we handle whiteouts by returning ENOENT before we even
get this far. However, for a mixed read/write transaction (e.g., a guard)
or certain ops (like create exclusive) we need to deal with the
exists == true and whiteout flag set case explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: clear whiteout when writing into cache tier
Sage Weil [Wed, 23 Oct 2013 01:02:25 +0000 (18:02 -0700)]
osd/ReplicatedPG: clear whiteout when writing into cache tier

If we have a whiteout object and then write over it, clear the whiteout
flag.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: set whiteout in cache pool on delete
Sage Weil [Wed, 23 Oct 2013 00:21:27 +0000 (17:21 -0700)]
osd/ReplicatedPG: set whiteout in cache pool on delete

If we delete an object in the cache pool, set the whiteout flag instead of
removing the on-disk object.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: verify delete creates whiteouts
Sage Weil [Wed, 23 Oct 2013 00:24:21 +0000 (17:24 -0700)]
ceph_test_rados_api_tier: verify delete creates whiteouts

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: ENOENT when deleting a whiteout
Sage Weil [Tue, 22 Oct 2013 23:30:26 +0000 (16:30 -0700)]
osd/ReplicatedPG: ENOENT when deleting a whiteout

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: create whiteout on promote ENOENT
Sage Weil [Tue, 22 Oct 2013 23:14:00 +0000 (16:14 -0700)]
osd/ReplicatedPG: create whiteout on promote ENOENT

If we try to fetch an object from the base tier and it is not present, we
can create a whiteout object.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: add simple promote-on-read test
Sage Weil [Wed, 23 Oct 2013 00:23:39 +0000 (17:23 -0700)]
ceph_test_rados_api_tier: add simple promote-on-read test

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: rename tests
Sage Weil [Tue, 22 Oct 2013 22:44:32 +0000 (15:44 -0700)]
ceph_test_rados_api_tier: rename tests

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: use simple_repop_{create,submit} for finish_promote
Sage Weil [Tue, 22 Oct 2013 22:12:38 +0000 (15:12 -0700)]
osd/ReplicatedPG: use simple_repop_{create,submit} for finish_promote

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: UNDIRTY is not a user_modify
Sage Weil [Sat, 7 Dec 2013 23:20:08 +0000 (15:20 -0800)]
osd/ReplicatedPG: UNDIRTY is not a user_modify

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: move r<0 handling into finish_promote()
Sage Weil [Tue, 22 Oct 2013 22:04:44 +0000 (15:04 -0700)]
osd/ReplicatedPG: move r<0 handling into finish_promote()

Let logic in header, and will let us handle ENOENT with a whiteout.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoworkunits: break down cache pool tests to be more precise; expand some
Greg Farnum [Tue, 15 Oct 2013 22:43:49 +0000 (15:43 -0700)]
workunits: break down cache pool tests to be more precise; expand some

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoworkunits: check errors propagate on cache pools in caching_redirects.sh
Greg Farnum [Mon, 14 Oct 2013 20:43:07 +0000 (13:43 -0700)]
workunits: check errors propagate on cache pools in caching_redirects.sh

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: promote: handle failed promotes
Greg Farnum [Thu, 10 Oct 2013 16:58:57 +0000 (09:58 -0700)]
ReplicatedPG: promote: handle failed promotes

If we get an error back, reply to the client directly and remove
the op which triggered promotion from our blocked op queue.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: promote: add the OpRequest to the Callback
Greg Farnum [Thu, 10 Oct 2013 16:37:35 +0000 (09:37 -0700)]
ReplicatedPG: promote: add the OpRequest to the Callback

This way we can do stuff to it, and we're about to.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: promote: first draft pass at doing object promotion
Greg Farnum [Thu, 10 Oct 2013 00:48:57 +0000 (17:48 -0700)]
ReplicatedPG: promote: first draft pass at doing object promotion

This is not yet at all complete -- among other things, it will
retry forever on any object which doesn't exist in the underlying
pool. But it demonstrates the approach reasonably clearly.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>y
11 years agoReplicatedPG: copy: don't return from finish_copyfrom
Greg Farnum [Thu, 10 Oct 2013 00:53:35 +0000 (17:53 -0700)]
ReplicatedPG: copy: don't return from finish_copyfrom

The return value is meaningless; nothing in this function can fail.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: copy: switch out the CopyCallback interface
Greg Farnum [Wed, 9 Oct 2013 23:16:36 +0000 (16:16 -0700)]
ReplicatedPG: copy: switch out the CopyCallback interface

The tuple was already unwieldy with 4 members; I didn't want to add
more. Instead, create a new CopyResults struct which contains all the
object info and completion data, and pass the retval and a CopyResults*
in the CopyCallbackResults tuple.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest_ipaddr: add another unit test
Sage Weil [Sat, 14 Dec 2013 00:02:22 +0000 (16:02 -0800)]
test_ipaddr: add another unit test

Was checking something for kbader.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: drop unused hit_set_start_stats
Sage Weil [Sat, 14 Dec 2013 00:02:02 +0000 (16:02 -0800)]
osd/ReplicatedPG: drop unused hit_set_start_stats

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: maintain stats for the hit_set_* objects
Sage Weil [Sat, 14 Dec 2013 00:01:48 +0000 (16:01 -0800)]
osd/ReplicatedPG: maintain stats for the hit_set_* objects

We also make hit_set.current_info reflect only the on-disk 'current', not
anything that is not persisted.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: set object_info_t, SnapSet on hit_set objects
Sage Weil [Fri, 13 Dec 2013 22:54:16 +0000 (14:54 -0800)]
osd/ReplicatedPG: set object_info_t, SnapSet on hit_set objects

These are first-class user-visible rados objects and need these attrs.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agovstart.sh: --hitset <pool> <type>
Sage Weil [Fri, 13 Dec 2013 22:50:34 +0000 (14:50 -0800)]
vstart.sh: --hitset <pool> <type>

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: debug: improve hit_set func banners
Sage Weil [Fri, 13 Dec 2013 02:14:12 +0000 (18:14 -0800)]
osd/ReplicatedPG: debug: improve hit_set func banners

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: do not update current_last_update on activate
Sage Weil [Fri, 13 Dec 2013 02:13:58 +0000 (18:13 -0800)]
osd/ReplicatedPG: do not update current_last_update on activate

Don't update this when we apply the log to our in-memory hitset!  We should
only update this when we persist something to disk.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: make HitSetWrite handle pg splits
Sage Weil [Tue, 10 Dec 2013 04:53:07 +0000 (20:53 -0800)]
ceph_test_rados_api_tier: make HitSetWrite handle pg splits

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: fix copy ctor
Sage Weil [Fri, 6 Dec 2013 21:51:02 +0000 (13:51 -0800)]
common/bloom_filter: fix copy ctor

We should not delete[] an uninitialized pointer.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: add HitSetRead
Sage Weil [Fri, 6 Dec 2013 19:28:04 +0000 (11:28 -0800)]
ceph_test_rados_api_tier: add HitSetRead

Verify that the HitSet reflects a read (and never written) object.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: HitSetRead -> HitSetWrite
Sage Weil [Fri, 6 Dec 2013 19:25:20 +0000 (11:25 -0800)]
ceph_test_rados_api_tier: HitSetRead -> HitSetWrite

This way it will pass despite thrashing.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: add HitSet trim test
Sage Weil [Fri, 6 Dec 2013 19:01:39 +0000 (11:01 -0800)]
ceph_test_rados_api_tier: add HitSet trim test

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: fix sealed initialization in Params ctor
Sage Weil [Fri, 6 Dec 2013 17:41:21 +0000 (09:41 -0800)]
osd/HitSet: fix sealed initialization in Params ctor

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph_test_rados_api_tier: make HitSetRead test less noisy
Sage Weil [Fri, 6 Dec 2013 17:39:21 +0000 (09:39 -0800)]
ceph_test_rados_api_tier: make HitSetRead test less noisy

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: fix copy ctor
Sage Weil [Fri, 6 Dec 2013 06:10:09 +0000 (22:10 -0800)]
osd/HitSet: fix copy ctor

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: fix dump() of fpp
Sage Weil [Fri, 6 Dec 2013 02:00:09 +0000 (18:00 -0800)]
osd/HitSet: fix dump() of fpp

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agotest/encoding/check-generated: test copy ctor, operator=
Sage Weil [Fri, 6 Dec 2013 02:11:10 +0000 (18:11 -0800)]
test/encoding/check-generated: test copy ctor, operator=

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-dencoder: add 'copy' command to test operator=
Sage Weil [Fri, 6 Dec 2013 01:16:39 +0000 (17:16 -0800)]
ceph-dencoder: add 'copy' command to test operator=

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomds/Capability: no copying
Sage Weil [Fri, 6 Dec 2013 01:16:08 +0000 (17:16 -0800)]
mds/Capability: no copying

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agotest: add a HitSet unit test
Greg Farnum [Thu, 5 Dec 2013 20:58:37 +0000 (12:58 -0800)]
test: add a HitSet unit test

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/HitSet: track BloomHitSet::Params fpp in micros, not as a double
Sage Weil [Wed, 4 Dec 2013 23:42:21 +0000 (15:42 -0800)]
osd/HitSet: track BloomHitSet::Params fpp in micros, not as a double

...and store it as a 32-bit value, so that it actually works!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: archive hit_set if it is old and not full
Sage Weil [Wed, 4 Dec 2013 23:17:57 +0000 (15:17 -0800)]
osd/ReplicatedPG: archive hit_set if it is old and not full

This matches the condition under which we call _persist().

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: prevent zero BloomHitSet fpp
Sage Weil [Wed, 4 Dec 2013 22:42:09 +0000 (14:42 -0800)]
osd: prevent zero BloomHitSet fpp

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: take Params as const ref to avoid confusion about ownership
Sage Weil [Wed, 4 Dec 2013 22:41:40 +0000 (14:41 -0800)]
osd/HitSet: take Params as const ref to avoid confusion about ownership

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/OSDMonitor: non-zero default bloom fpp
Sage Weil [Wed, 4 Dec 2013 22:41:04 +0000 (14:41 -0800)]
mon/OSDMonitor: non-zero default bloom fpp

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/HitSet: make pg_pool_t and Params operator<< less parenthetical
Sage Weil [Wed, 4 Dec 2013 22:17:03 +0000 (14:17 -0800)]
osd/HitSet: make pg_pool_t and Params operator<< less parenthetical

pool 0 'data' rep size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 8 owner 0 crash_replay_interval 45 hit_set bloom{false_positive_probability: 0, target size: 0, seed: 0} 10s x8

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: apply log to new HitSet to capture writes after peering
Sage Weil [Wed, 4 Dec 2013 22:11:53 +0000 (14:11 -0800)]
osd/ReplicatedPG: apply log to new HitSet to capture writes after peering

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: do not seal() HitSets until we're done with them
Greg Farnum [Wed, 4 Dec 2013 20:57:44 +0000 (12:57 -0800)]
ReplicatedPG: do not seal() HitSets until we're done with them

We don't want to seal HitSets just because we're writing a
snapshot to disk; it potentially shrinks the in-memory one
we want to keep adding stuff to!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agopg_hit_set_info_t: remove unused size, target_size members
Greg Farnum [Wed, 4 Dec 2013 20:45:33 +0000 (12:45 -0800)]
pg_hit_set_info_t: remove unused size, target_size members

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoceph_test_rados: hit hit_set_{list,get} rados operations
Sage Weil [Wed, 4 Dec 2013 17:39:26 +0000 (09:39 -0800)]
ceph_test_rados: hit hit_set_{list,get} rados operations

This will do a list, and then get a random HitSet.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: trim old hit_set objects on persist
Sage Weil [Wed, 4 Dec 2013 17:11:02 +0000 (09:11 -0800)]
osd/ReplicatedPG: trim old hit_set objects on persist

Any time we persist a hit_set object, take the opportunity to remove any
old ones that we don't want any more.

Note that this means if the admin decreases the number of objects to track,
we won't remove them until the next time we persist something.  We also
don't clean up if the HitSet tracking is disabled entirely.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: put hit_set objects in a configurable namespace
Sage Weil [Mon, 2 Dec 2013 19:27:05 +0000 (11:27 -0800)]
osd/ReplicatedPG: put hit_set objects in a configurable namespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrados: create new ceph_test_rados_api_tier target
Sage Weil [Sun, 6 Oct 2013 18:39:04 +0000 (11:39 -0700)]
librados: create new ceph_test_rados_api_tier target

Move the dirty/undirty test to it, and add one for HitSets.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agolibrados, osd: list and get HitSets via librados
Greg Farnum [Tue, 19 Nov 2013 00:52:50 +0000 (16:52 -0800)]
librados, osd: list and get HitSets via librados

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/ReplicatedPG: use vectorized osd_op outdata for pg ops
Sage Weil [Sun, 6 Oct 2013 18:39:58 +0000 (11:39 -0700)]
osd/ReplicatedPG: use vectorized osd_op outdata for pg ops

This lets us put PGLS in a compound operation.  Nothing does that yet, but
this would allow it.
Despite appearances, this is not a protocol change and does not require
a feature bit for clients: using the osd_ops vector mechanisms store all
the data in the same places as before, it just fills in some of the
already-decoded-but-empty data structures in the MOSDOpReply header.
<Greg note:> We may need a feature bit to let clients know they can send
compound PG ops to OSDs, though? Or maybe we can let it be covered
by supporting hitset ops.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: add basic HitSet tracking
Sage Weil [Fri, 11 Oct 2013 23:06:07 +0000 (16:06 -0700)]
osd/ReplicatedPG: add basic HitSet tracking

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agomon/OSDMonitor: set hit_set fields
Sage Weil [Thu, 10 Oct 2013 22:40:29 +0000 (15:40 -0700)]
mon/OSDMonitor: set hit_set fields

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: add hit_set_* parameters to pg_pool_t
Sage Weil [Thu, 19 Sep 2013 15:48:07 +0000 (08:48 -0700)]
osd: add hit_set_* parameters to pg_pool_t

Add pool properties to control what type of HitSet we want to use, along with
some (mostly generic) parameters.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/osd_types: include pg_hit_set_history_t in pg_info_t
Sage Weil [Thu, 3 Oct 2013 23:40:15 +0000 (16:40 -0700)]
osd/osd_types: include pg_hit_set_history_t in pg_info_t

Track metadata about the currently accumulating HitSet as well as
previously archived ones in the pg_info_t.  This will not scale well for
extremely long histories, but does let us avoid explicitly sharing this
metadata during recovery or other normal update activity.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: add pg_hit_set_{info,history}_t
Sage Weil [Thu, 3 Oct 2013 22:29:15 +0000 (15:29 -0700)]
osd/osd_types: add pg_hit_set_{info,history}_t

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: fix operator=
Sage Weil [Fri, 6 Dec 2013 06:19:57 +0000 (22:19 -0800)]
common/bloom_filter: fix operator=

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd_types: add generic HitSet type with bloom and explicit implementations
Sage Weil [Thu, 3 Oct 2013 05:41:54 +0000 (22:41 -0700)]
osd_types: add generic HitSet type with bloom and explicit implementations

Track a set of hash values, either explicitly or using a bloom_filter. Hide
the implementation and allow us to transparently encode and decode.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/ReplicatedPG: factor out simple_repop_{create,submit} helpers
Sage Weil [Fri, 4 Oct 2013 23:07:20 +0000 (16:07 -0700)]
osd/ReplicatedPG: factor out simple_repop_{create,submit} helpers

This makes it easier to create repops correctly, and should help
prevent bugs like the one we remove here in process_copy_op (we were
serializing on the wrong object!)

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd/PG: factor out get_next_version()
Greg Farnum [Fri, 15 Nov 2013 23:16:20 +0000 (15:16 -0800)]
osd/PG: factor out get_next_version()

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agolibrados: add wait_for_latest_osdmap()
Greg Farnum [Fri, 15 Nov 2013 23:48:55 +0000 (15:48 -0800)]
librados: add wait_for_latest_osdmap()

There are times when users may need to make sure the client has the
latest osdmap, for example after sending a mon command modifying
pool properties.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
squash "librados: add wait_for_latest_osdmap()"

11 years agolibrados: expose methods for calculating object hash position
Sage Weil [Fri, 11 Oct 2013 22:34:33 +0000 (15:34 -0700)]
librados: expose methods for calculating object hash position

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosdc/Objecter: expose methods for getting object hash position and pg
Sage Weil [Fri, 11 Oct 2013 22:34:19 +0000 (15:34 -0700)]
osdc/Objecter: expose methods for getting object hash position and pg

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosd: capture hashing of objects to hash positions/pgs in pg_pool_t
Sage Weil [Fri, 11 Oct 2013 22:33:45 +0000 (15:33 -0700)]
osd: capture hashing of objects to hash positions/pgs in pg_pool_t

The hashing is dependent on pool properties; capture (more of) it in a
method instead of having it in OSDMap.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosd/OSDMap: use new object_locator_t::hash to place object in a pg
Sage Weil [Thu, 3 Oct 2013 05:15:41 +0000 (22:15 -0700)]
osd/OSDMap: use new object_locator_t::hash to place object in a pg

The hash value, if provided, becomes the ps (placement seed) portion of the
pg_t, skipping any hashing of the object name (or locator key).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosd/osd_types: add explicit hash to object_locator_t
Greg Farnum [Fri, 15 Nov 2013 19:12:03 +0000 (11:12 -0800)]
osd/osd_types: add explicit hash to object_locator_t

Instead of hashing the object name or key, we allow the hash position to be
provided explicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoencoding: allow users to specify a different compatv after encoding
Greg Farnum [Thu, 21 Nov 2013 01:04:26 +0000 (17:04 -0800)]
encoding: allow users to specify a different compatv after encoding

This way we can set the compatv preferentially depending on whether
we've actually encoded new information or not.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agolibrados: add mon_command to C++ API
Sage Weil [Thu, 10 Oct 2013 23:23:57 +0000 (16:23 -0700)]
librados: add mon_command to C++ API

This way librados users can execute monitor commands.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agolibrados: document aio_flush()
Sage Weil [Sun, 6 Oct 2013 19:55:16 +0000 (12:55 -0700)]
librados: document aio_flush()

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agolibrados: constify inbl command args
Sage Weil [Thu, 10 Oct 2013 23:13:58 +0000 (16:13 -0700)]
librados: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosdc/Objecter: constify inbl command args
Sage Weil [Thu, 10 Oct 2013 23:13:43 +0000 (16:13 -0700)]
osdc/Objecter: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agomon/MonClient: constify inbl command args
Sage Weil [Thu, 10 Oct 2013 23:13:31 +0000 (16:13 -0700)]
mon/MonClient: constify inbl command args

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosdc/Objecter: reimplement list_objects
Sage Weil [Thu, 10 Oct 2013 16:56:39 +0000 (09:56 -0700)]
osdc/Objecter: reimplement list_objects

Return to caller at the end of each PG.  This allows the caller to look at
the [pg_]hash_position and get something meaningful.

If there are no objects in the PG, we skip it so that every callback has
*some* data (unless the pool is totally empty!).  So the real difference
here is that we don't move on to the next PG just to reach max_entries.

This gives the client some data sooner, but may mean more callbacks into
client code.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrados: add get_pg_hash_position to determine pg while listing objects
Sage Weil [Thu, 3 Oct 2013 19:38:40 +0000 (12:38 -0700)]
librados: add get_pg_hash_position to determine pg while listing objects

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: stick bl inside ListContext
Sage Weil [Thu, 10 Oct 2013 15:51:23 +0000 (08:51 -0700)]
osdc/Objecter: stick bl inside ListContext

This is simpler and less error-prone.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: factor pg_read out of list_objects code
Sage Weil [Sun, 6 Oct 2013 20:30:23 +0000 (13:30 -0700)]
osdc/Objecter: factor pg_read out of list_objects code

This will get used later for other ops against PGs (instead of objects).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: separate explicit pg target from current target
Sage Weil [Sun, 6 Oct 2013 20:22:31 +0000 (13:22 -0700)]
osdc/Objecter: separate explicit pg target from current target

The pgid field is used to store the pg the op mapped to.  We were just
setting it directly for PGLS.  Instead, fill in a new base_pgid, and copy that
to pgid in recalc_op_target(), the same way we do when we map an object
name to a PG.

In particular, we take this opportunity to map a raw pgid to an actual
pgid.  This means the base_pg could come from a raw hash value (although
it doesn't, yet).

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosdc/Objecter: drop redundant condition
Sage Weil [Thu, 10 Oct 2013 15:51:53 +0000 (08:51 -0700)]
osdc/Objecter: drop redundant condition

We are inside an if (response_size) block.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: make pref optional in pg_t constructor
Sage Weil [Sun, 6 Oct 2013 18:37:15 +0000 (11:37 -0700)]
osd/osd_types: make pref optional in pg_t constructor

We don't use preferred placements any more, so this will
make it easier to start dropping references to it in new code.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agov0.72 v0.72
Gary Lowell [Thu, 7 Nov 2013 20:27:35 +0000 (20:27 +0000)]
v0.72

11 years agorgw: deny writes to a secondary zone by non-system users
Yehuda Sadeh [Tue, 5 Nov 2013 22:54:20 +0000 (14:54 -0800)]
rgw: deny writes to a secondary zone by non-system users

Fixes: #6678
We don't want to allow regular users to write to secondary zones,
otherwise we'd end up with data inconsistencies.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agodoc/release-notes: note crush update timeout on startup change
Sage Weil [Thu, 7 Nov 2013 04:02:09 +0000 (20:02 -0800)]
doc/release-notes: note crush update timeout on startup change

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdmaptool: fix cli tests
Sage Weil [Thu, 7 Nov 2013 03:59:56 +0000 (19:59 -0800)]
osdmaptool: fix cli tests

From c22c84a88c22688b6044ab37f65a3fe40dfe1983.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCeph: Fix memory leak in chain_flistxattr()
Li Wang [Thu, 7 Nov 2013 02:44:30 +0000 (10:44 +0800)]
Ceph: Fix memory leak in chain_flistxattr()

Free allocated memory before return.

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: don't skip missing if sentries is empty on pgls
Samuel Just [Wed, 6 Nov 2013 22:33:03 +0000 (14:33 -0800)]
ReplicatedPG: don't skip missing if sentries is empty on pgls

Formerly, if sentries is empty, we skip missing.  In general,
we need to continue adding items from missing until we get
to next (returned from collection_list_partial) to avoid
missing any objects.

Fixes: #6633
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoPG: fix operator<<,log_wierdness log bound warning
Samuel Just [Wed, 6 Nov 2013 05:48:53 +0000 (21:48 -0800)]
PG: fix operator<<,log_wierdness log bound warning

Split may cause holes such that head != tail and yet
log.empty().

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoPGLog::rewind_divergent_log: log may not contain newhead
Samuel Just [Wed, 6 Nov 2013 01:47:48 +0000 (17:47 -0800)]
PGLog::rewind_divergent_log: log may not contain newhead

Due to split, there may be a hole at newhead.

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #824 from dmick/next
Sage Weil [Wed, 6 Nov 2013 15:46:02 +0000 (07:46 -0800)]
Merge pull request #824 from dmick/next

osdmaptool: don't put progress on stdout

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoRadosModel: use sharedptr_registry for snaps_in_use
Samuel Just [Tue, 5 Nov 2013 23:40:29 +0000 (15:40 -0800)]
RadosModel: use sharedptr_registry for snaps_in_use

There might be two concurrent rollback ops each of which
adds snap x to snaps_in_use.  Between when the first
completes and the second completes, snap x may be removed
since the first would have removed snap x from snaps_in_use.
Using sharedptr_registry here avoids this by ensuring that
the snap won't be removed from snaps_in_use until all refs
are gone.

This patch also adds size() to sharedptr_registry.

Fixes: #6719
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoosdmaptool: don't put progress on stdout 824/head
Dan Mick [Wed, 6 Nov 2013 00:11:10 +0000 (16:11 -0800)]
osdmaptool: don't put progress on stdout

If one requests JSON output, the progress message pollutes the output;
don't do that, send it to stderr instead

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoFileStore::_collection_move_rename: handle missing dst dir on replay
Samuel Just [Mon, 4 Nov 2013 19:25:31 +0000 (11:25 -0800)]
FileStore::_collection_move_rename: handle missing dst dir on replay

In case of a replay, a missing destination directory indicates that
the destination object and directory have been removed by a later
transaction.  Thus, we need to remove the src object and return
0.

Fixes: #6714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #814 from ceph/wip-da-fix-galois-warning
Loic Dachary [Tue, 5 Nov 2013 00:36:32 +0000 (16:36 -0800)]
Merge pull request #814 from ceph/wip-da-fix-galois-warning

galois.c: fix compiler warning

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agogalois.c: fix compiler warning 814/head
Danny Al-Gaaf [Mon, 4 Nov 2013 22:30:47 +0000 (23:30 +0100)]
galois.c: fix compiler warning

galois_create_split_w8_tables() takes no parameter, remove '8' passed
to the function in one case.

osd/ErasureCodePluginJerasure/galois.c: In function 'galois_w32_region_multiply':
osd/ErasureCodePluginJerasure/galois.c:696:5: warning: call to function 'galois_create_split_w8_tables' without a real prototype [-Wunprototyped-calls]
In file included from osd/ErasureCodePluginJerasure/galois.c:53:0:
osd/ErasureCodePluginJerasure/galois.h:71:12: note: 'galois_create_split_w8_tables' was declared here

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoOSD: allow project_pg_history to handle a missing map
Samuel Just [Mon, 4 Nov 2013 05:02:36 +0000 (21:02 -0800)]
OSD: allow project_pg_history to handle a missing map

If we get a peering message for an old map we don't have, we
can throwit out: the sending OSD will learn about the newer
maps and update itself accordingly, and we don't have the
information to know if the message is valid. This situation
can only happen if the sender was down for a long enough time
to create a map gap and its PGs have not yet advanced from
their boot-up maps to the current ones, so we can rely on it

Fixes: #6712
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: don't clear peering_wait_for_split in advance_map()
Samuel Just [Sun, 3 Nov 2013 19:06:10 +0000 (11:06 -0800)]
OSD: don't clear peering_wait_for_split in advance_map()

I really don't know why I added this...  Ops can be discarded from the
waiting_for_pg queue if we aren't primary simply because there must have
been an exchange of peering events before subops will be sent within a
particular epoch.  Thus, any events in the waiting_for_pg queue must be
client ops which should only be seen by the primary.  Peering events, on
the other hand, should only be discarded if we are in a new interval,
and that check might as well be performed in the peering wq.

Fixes: #6681
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir
Samuel Just [Sat, 2 Nov 2013 20:54:51 +0000 (13:54 -0700)]
ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir

Otherwise, if last_backfill_started is a snapdir, we will fail to send a
transaction for a client IO creating the head object and removing the
snapdir object.  The result will be that head will eventually be
backfilled, but the snapdir object will erroneously not be removed.

Fixes: #6685
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #809 from ceph/wip-pgmap
Gregory Farnum [Sun, 3 Nov 2013 17:25:28 +0000 (09:25 -0800)]
Merge pull request #809 from ceph/wip-pgmap

Reviewed-by: Greg Farnum <greg@inktank.com>