Commit Graph

32869 Commits

Author SHA1 Message Date
Yan, Zheng
55cfb142fa mds: fix shared_ptr MDRequest bugs
The main change is use shared_ptr instead of weak_ptr to define
active request map. The reason is that slave request needs to be
preserved until master explicitly finishes it.

Fixes: #8026
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-08 16:29:43 +08:00
Loic Dachary
2ba00bd2e8 erasure-code: thread-safe initialization of gf-complete
Instead of relying on an implicit initialization happening during
encoding/decoding with galois.c:galois_init_default_field, call
gf.c:gf_init_easy for each w values when the plugin is loaded.

Loading the plugin is protected against race conditions by a lock.

It does not cover all possible uses of gf-complete but it is enough for
the ceph jerasure plugin.

http://tracker.ceph.com/issues/7914 fixes #7914

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-08 09:47:33 +02:00
Sage Weil
2a6d962f47 Merge pull request #1610 from ceph/wip-4354-shared_ptr
Use shared pointers for Mutations/OpRequests in the MDS

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 21:27:50 -07:00
Sage Weil
9ea31f152d Merge pull request #1594 from ceph/wip-7958
wip 7958

Passed sage-2014-04-07_07:04:02-fs-wip-7958-testing-basic-plana.

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 21:27:04 -07:00
Samuel Just
010dff12c3 osd_types: fix pg_stat_t::encode, object_stat_sum_t::decode version
Introduced in a130a4452e
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 17:04:15 -07:00
Greg Farnum
22894c3a12 SimpleLock: Switch MutationRef& for MutationRef in get_xlock()
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:19 -07:00
Greg Farnum
5f2ccab68f MDCache: use raw MutationImpl* instead of MutationRef in a few places
Avoid the atomic ops necessary when copying a shared_ptr.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:19 -07:00
Greg Farnum
6c3fc3eeea Locker: use raw MutationImpl* instead of MutationRef in several places
Sadly, you can't implicitly convert non-const references to shared pointers, so avoid the atomic ops necessary when copying a shared_ptr.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:19 -07:00
Greg Farnum
920fd6cac1 Locker: use a null_ref instead of NULL
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
099d1d6f46 Locker: Use MutationRef instead of raw pointers
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
e800bfa918 Locker: remove Mutation param from xlock_import
It's not used.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
1294e55e2a MDCache: fix users of active_requests for use of shared_ptr
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
a5c7b27d72 MDCache: use a null_ref instead of NULL in a few places
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
6b76998d1f MDCache: use MutationRef instead of raw pointers
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:18 -07:00
Greg Farnum
a6a0800005 Server: use MutationRef instead of raw pointer
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:17 -07:00
Greg Farnum
4dedab64c2 MDS: switch cache object classes to use MutationRef instead of raw pointers
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-04-07 17:00:17 -07:00
Sage Weil
9a4a429ed2 ceph_test_rados_api_misc: print osd_max_attr_size
Very confusing results from this test in bug #8009.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-07 16:31:16 -07:00
Sage Weil
91a9d57429 Merge pull request #1612 from ceph/wip-7919
mon: MonCommands: have all 'auth' commands require 'execute' caps

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 16:11:51 -07:00
Sage Weil
aa301b0e49 Merge pull request #1620 from ceph/wip-8003
Wip 8003

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 16:09:40 -07:00
Sage Weil
aff20f5eb2 Merge pull request #1611 from ceph/wip-7975
osd: disable agent when stats_invalid (post-split)

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-07 15:59:37 -07:00
John Wilkins
4b66868e6f doc: Removed --stable arg and replaced with --release arg for ceph-deploy.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-04-07 15:49:09 -07:00
Sage Weil
7273d9ea29 osd/ReplicatedPG: warn if invalid stats prevent us from activating agent
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-07 15:40:47 -07:00
Sage Weil
02d7e84d30 osd/ReplicatedPG: dump agent state on pg query
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-07 15:40:47 -07:00
Sage Weil
fa46aec723 osd/ReplicatedPG: kickstart the agent if scrub stats become valid
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-07 15:40:47 -07:00
Sage Weil
51839a33c9 v0.79
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTQtbkAAoJEH6/3V0X7TFt2UMP/0et0RG4R9rQTih7Ms/GnCuQ
 TgCQLtJmaXRSMzfsQREJ4K2tX74wobgBI9bz05rndZD4wajHGyFCbJdC5KQYpTOm
 Hh2krrr5SkFliWnp8LZKeVRgJT2vVbIDUh3bJhqF15cnhfPOYDoov373XjCWtdRP
 lNAuO6uh/CxQLYJnl/hiXK27P4IdHo+9HFIfaPGd+pMiEFYGjJKJiS5GG9YNiWDc
 VTJYZdBtcNc7CeJEqcz/2oL0X7WMdDIFRJ0wUWU+g8MBDggICzz4QJ8iZjVw9Z+i
 tcD+mE39XnzgPcaBcJmR9oygM5qAcgMWZBbJyknebQ87AWxG2fZ0G4h/9so9TwVq
 xm7Vpavg7FhpuBS4VU5H7aJNxrNJ8+dOOAtLs7BrJojUN4pB5ePYkPsHxoSK6iGC
 JC+WqaNdEqfHl8C2jy1RNpYo8aX9o1yZetnqUMFGQ07gaE9HzsjJkEfR/7wP4mjF
 njF85PqRQ46t5a+aebScwkYco8Q2yenSAD6mfVqY4pR0Tza5r2u/TP8OdOtenmsf
 BJTffdKXrGjIeaeKuUUDMLxHbDq3bcksxh9BA6gBFq+7W5lq06fsbFUr4/sLjb2r
 zQQHVeeZy0yC6ZG1Fpxs8ry0WBDbJ7zO7vtVfHznRetDsHkt9ZHC6/RtxdXiatJu
 YrROi7w9vj/3eG2ajohi
 =MSwq
 -----END PGP SIGNATURE-----

Merge tag 'v0.79' into firefly

v0.79
2014-04-07 15:04:18 -07:00
Samuel Just
9870b75b62 Merge pull request #1619 from ceph/wip-7659
Wip 7659

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2014-04-07 14:47:40 -07:00
Samuel Just
07099ecd4c ReplicatedPG: do not evict head while clone is being promoted
Fixes: #8003
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 14:34:01 -07:00
Samuel Just
67b2342ab8 ReplicatedPG::trim_object: account evicted prev clone for stats
If the previous clone is evicted, we shouldn't adjust the stats to
account for its new clone_overlap value.

Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 14:34:01 -07:00
Samuel Just
6ff6c19d65 ReplicatedPG::make_writeable: check for evicted clone before adjusting for clone_overlap
Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 14:33:56 -07:00
Sage Weil
afff0ef400 Merge pull request #1617 from ceph/wip-7904
Wip 7904

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 14:02:58 -07:00
Sage Weil
008ce85d19 Merge pull request #1614 from ceph/wip-7964
Wip 7964

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 14:01:58 -07:00
Sage Weil
71fc7ae306 Merge pull request #1616 from ceph/wip-7916
ReplicatedPG: improve get_object_context debugging

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 13:59:22 -07:00
Samuel Just
a8a49a034a ReplicatedPG: use get_clone_bytes on evict/promote
Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 13:51:18 -07:00
Samuel Just
32862838a1 ReplicatedPG::_scrub: account for clone_overlap on each clone
Otherwise, we end up subtracting off clone_overlap for evicted clones
whose sizes we did not add in.

Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 13:51:18 -07:00
Samuel Just
4d5db0616e ReplicatedPG::find_object_context: check obs.exists on clone obc before checking snaps
Fixes: #7858
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 13:51:17 -07:00
Samuel Just
d0e2c98665 ReplicatedPG::finish_promote: add debugging assert for clone_size
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-04-07 13:51:17 -07:00
Sage Weil
1a9952c605 Merge pull request #1613 from ceph/wip-7994
OSD: _share_map_outgoing whenever sending a message to a peer

Reviewed-by: Sage Weil <sage@inktank.com>
2014-04-07 10:57:33 -07:00
Joao Eduardo Luis
e213ee1573 qa: workunits: mon: auth_caps.sh: test 'auth' caps requirements
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-04-07 18:30:56 +01:00
Joao Eduardo Luis
85a1cf31e6 mon: MonCommands: have all 'auth' commands require 'execute' caps
Earlier patch already have the entity requiring 'execute' caps for
read-only commands.  This patch introduces the same requirement for *all*
auth commands, read-only and read-write alike.

While the rationale behind the earlier patch for leaving read-write
operations out of this requirement still holds, we now enforce this to
match compatibility with what was happening back on Dumpling with regard
to the 'execute' cap being required for auth commands.  However, it should
be noted that back on Dumpling we were only requiring the 'execute' cap
for auth commands, regardless of read-only or read-write, and no other
caps were required.

Fixes: 7919

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-04-07 18:17:54 +01:00
Jenkins
4c2d73a509 0.79 2014-04-07 16:48:36 +00:00
Sage Weil
51da3bb07a mds: fix uninit val in MMDSSlaveRequest
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-07 08:22:32 -07:00
Sage Weil
db281bf51e Merge pull request #1607 from ceph/wip-7997
mon: wait for quorum for MMonGetVersion

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-04-07 08:11:00 -07:00
Yan, Zheng
09586ec2e0 client: pin parent dentry of inode who has ll_ref > 0
This prevents Client:trim_dentry() from unlinking parent dentry of
directory inode referenced by fuse kernel module.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-04-07 13:36:05 +08:00
Sage Weil
68e27116d0 Merge pull request #1609 from ceph/wip-7739
mds: fix some uninitialized message fields

Reviewed-by: Zheng Yan <zheng.z.yan@intel.com>
2014-04-06 17:56:05 -07:00
Sage Weil
76cbd5dd82 mds: fix uninit MMDSSlaveRequest lock_type
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-06 17:36:52 -07:00
Samuel Just
c0fd3df41e Merge pull request #1608 from ceph/wip-8002
osd: fix osd map subscribe on YOU_DIED osd_ping

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-06 16:32:38 -07:00
Sage Weil
4ea9e4818f osd: fix map subscription in YOU_DIED osd_ping handler
If we have epoch X and find out we died as of epoch Y, we still want to
request X+1.  Among other things, this fixes a 'stall' if Y happens to be
the most recent map published and no new maps are generated because we will
never get anything back from our subscription.

This makes this osdmap_subscribe() caller match every other caller by
passing in current epoch + 1.

Fixes: #8002
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-06 16:03:50 -07:00
Sage Weil
2f7522c83a msgr: add ms_dump_on_send option
This is useful only for debugging.  The encoded contents of a message are
dumped to the log on message send.  This is useful when valgrind is
triggering warnings about uninitialized memory in messages because the
call chain will indicate which message type is to blame, whereas the
usual writer thread context does not tell us any useful information.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-06 13:19:11 -07:00
Sage Weil
87e6a62e4f mds: fix uninitialized fields in MDiscover
Fixes: #7739
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-06 13:18:40 -07:00
Sage Weil
67fd4218d3 mon: wait for quorum for MMonGetVersion
We should not respond to checks for map versions when we are in the
probing or electing states or else clients will get incorrect results when
they ask what the latest map version is.

Fixes: #7997
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-05 16:58:55 -07:00