]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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>
11 years agoosd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()
Xing Lin [Sun, 3 Nov 2013 01:24:22 +0000 (19:24 -0600)]
osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()

When bitmatrix is NULL, this function returns NULL.

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon/PGMap: use const ref, not pass-by-value 809/head
Sage Weil [Sat, 2 Nov 2013 06:56:45 +0000 (23:56 -0700)]
mon/PGMap: use const ref, not pass-by-value

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #806 from jdurgin/wip-xfstests
Sage Weil [Sat, 2 Nov 2013 06:32:26 +0000 (23:32 -0700)]
Merge pull request #806 from jdurgin/wip-xfstests

Don't run racy xfstest 008

11 years agoMerge pull request #807 from jdurgin/wip-rbd-map-rw
Sage Weil [Sat, 2 Nov 2013 06:31:44 +0000 (23:31 -0700)]
Merge pull request #807 from jdurgin/wip-rbd-map-rw

rbd: omit 'rw' option during map

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #804 from jdurgin/wip-rgw-replica-log-next
Yehuda Sadeh [Sat, 2 Nov 2013 04:00:24 +0000 (21:00 -0700)]
Merge pull request #804 from jdurgin/wip-rgw-replica-log-next

rgw: don't turn 404 into 400 for the replicalog api

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorbd: omit 'rw' option during map 807/head
Josh Durgin [Sat, 2 Nov 2013 02:02:29 +0000 (19:02 -0700)]
rbd: omit 'rw' option during map

The ro and rw options were added in linux 3.7. To be compatible with
older kernels, don't specify rw. The default will probably always be
rw, so this should not present any problems in the future.

Reported-by: nicolasc <nicolas.canceill@surfsara.nl>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoqa: don't run racy xfstest 008 806/head
Josh Durgin [Sat, 2 Nov 2013 01:41:02 +0000 (18:41 -0700)]
qa: don't run racy xfstest 008

This test attempts to generate a random number of holes within a
particular range, but may fail because hole placement is random.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #802 from ceph/wip-6673b
David Zafman [Fri, 1 Nov 2013 23:36:19 +0000 (16:36 -0700)]
Merge pull request #802 from ceph/wip-6673b
(manually merged after next branch rebuilt)

OSDMonitor: be a little nicer about letting users do pg splitting

Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoOSDMonitor: be a little nicer about letting users do pg splitting
Greg Farnum [Fri, 1 Nov 2013 22:45:02 +0000 (15:45 -0700)]
OSDMonitor: be a little nicer about letting users do pg splitting

We were previously blocking pg splits whenever pg creations were in-
progress, but we only really need to avoid splitting any pgs which are
currently being created. Let the user set a different pg_num if there
are no creating PGs on the pool in question.

Fixes: #6673, take two
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agorgw: don't turn 404 into 400 for the replicalog api 804/head
Josh Durgin [Fri, 1 Nov 2013 23:12:52 +0000 (16:12 -0700)]
rgw: don't turn 404 into 400 for the replicalog api

404 is not actually a problem to clients like radosgw-agent, but 400
implies something about the request was incorrect.

Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoWrap hex_to_num table into class HexTable
Ray Lv [Wed, 30 Oct 2013 03:40:54 +0000 (11:40 +0800)]
Wrap hex_to_num table into class HexTable

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years ago[rgw] Set initialized to true after populating table in hex_to_num()
Ray Lv [Tue, 29 Oct 2013 11:34:51 +0000 (19:34 +0800)]
[rgw] Set initialized to true after populating table in hex_to_num()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agosharedptr_registry.hpp: removed ptrs need to not blast contents
Samuel Just [Thu, 31 Oct 2013 20:19:32 +0000 (13:19 -0700)]
sharedptr_registry.hpp: removed ptrs need to not blast contents

See the included unit test update.  Consider:
1) x = lookup_or_create(1, 1)
2) remove(1)
3) y = lookup_or_create(1, 2)
4) x.reset()
5) z = lookup(1)

The bug is that z will be null since x.reset() caused the
cleanup callback to remove y's key value from contents.

To fix this, contents also records the pointer value for
the weak_ptr.  The removal callback only removes the
key from contents if it matches the ptr in contents.

This should work since the pointer passed to the removal
callback must be unique up to that point since it has
not yet been deleted.

This allowed a pg removal -> pg recreation -> pg removal
sequence to cause the second pg removal entry to be
erroneously cleared by the first pg removal's destructor
as it finally made its way through the removal queue.

Fixes: #5951
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoprio-q: initialize cur iterator
Noah Watkins [Wed, 30 Oct 2013 23:34:29 +0000 (16:34 -0700)]
prio-q: initialize cur iterator

For new SubQueues `cur` is not intialized, so front/pop_front will freak
out. I honestly I have no idea how this hasn't been seen, but it was
being triggered frequently on OSX.

Fixes: #6686
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoPGLog: remove obsolete assert in merge_log
Samuel Just [Wed, 30 Oct 2013 23:54:39 +0000 (16:54 -0700)]
PGLog: remove obsolete assert in merge_log

This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.

Related: 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest/osd/RadosModel.h: select and reserve roll_back_to atomically
Samuel Just [Wed, 30 Oct 2013 23:12:19 +0000 (16:12 -0700)]
test/osd/RadosModel.h: select and reserve roll_back_to atomically

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest/rados/list.cc: we might get some objects more than once
Samuel Just [Tue, 29 Oct 2013 21:53:53 +0000 (14:53 -0700)]
test/rados/list.cc: we might get some objects more than once

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoos/chain_listxattr: fix leak fix
Sage Weil [Wed, 30 Oct 2013 20:20:46 +0000 (13:20 -0700)]
os/chain_listxattr: fix leak fix

e22347df3854a5c5ebc6631c62d70447d67d722d added a bad goto; just free
explicitly instead.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge branch 'next' of jenkins:ceph/ceph into next
Gary Lowell [Wed, 30 Oct 2013 18:34:42 +0000 (18:34 +0000)]
Merge branch 'next' of jenkins:ceph/ceph into next

11 years agoceph: Release resource before return in BackedObject::download()
Li Wang [Wed, 30 Oct 2013 13:32:34 +0000 (21:32 +0800)]
ceph: Release resource before return in BackedObject::download()

Close file before return

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph: Fix memory leak in chain_listxattr
Li Wang [Wed, 30 Oct 2013 08:39:09 +0000 (16:39 +0800)]
ceph: Fix memory leak in chain_listxattr

Free allocated memory before return

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoFix memory leak in Backtrace::print()
Li Wang [Wed, 30 Oct 2013 08:18:10 +0000 (16:18 +0800)]
Fix memory leak in Backtrace::print()

Free already allocated memory if short of memory

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agov0.72-rc1 v0.72-rc1
Gary Lowell [Wed, 30 Oct 2013 00:45:10 +0000 (00:45 +0000)]
v0.72-rc1

11 years agoRevert "ceph-crush-location: new crush location hook"
Sage Weil [Tue, 29 Oct 2013 20:58:14 +0000 (13:58 -0700)]
Revert "ceph-crush-location: new crush location hook"

This reverts commit fc49065d855cfd74cb861d294f3464dd616e82ee.

Merged to wrong branch; my bad!