Commit Graph

28991 Commits

Author SHA1 Message Date
Joao Eduardo Luis
296f2d0db3 osd: OSD: add 'heap' command to known osd commands array
Must have been forgotten during the cli rework.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:42 +01:00
Joao Eduardo Luis
238fe272c6 mds: MDS: pass only heap profiler commands instead of the whole cmd vector
The heap profiler doesn't care, nor should it, what our command name is.
It only cares about the commands it handles.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:21 +01:00
Joao Eduardo Luis
c98b910d49 perfglue/heap_profiler.cc: expect args as first element on cmd vector
We used to pass 'heap' as the first element of the cmd vector when
handling commands.  We haven't been doing so for a while now, so we
needed to fix this.

Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.

Fixes: #6361
Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:10 +01:00
Samuel Just
e112a8348a FileStore: only remove the omap entries if nlink == 1
Fixes: #6359
Introduced in 17c5d765d7
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-20 09:30:06 -07:00
Yehuda Sadeh
7c1d2ded8f lru_map: don't use list::size()
replace list::size() with map::size(), which should have
a constant time complexity.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:56:22 -07:00
Yehuda Sadeh
532e41a998 common/lru_map: rename tokens to entries
This code was originally used in a token cache, now
as a generic infrastructure rename token fields.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:55:46 -07:00
Yehuda Sadeh
ca984e321e bufferlist: don't use list::size()
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:55:12 -07:00
Sage Weil
04de6a839f Merge pull request #590 from ceph/wip-6284
osdc/ObjectCacher: finish contexts after dropping object reference

Tested: ubuntu@teuthology:/a/sage-2013-09-19_19:40:56-fs-wip-6284-testing-basic-plana
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-20 08:46:29 -07:00
Sage Weil
0681971e62 Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw
They belong next to the class.  Also, if rgw isn't built, ceph-dencoder
will fail to link.

Fixes: #6352
Tested-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 21:03:36 -07:00
David Zafman
91dcdec18e Merge pull request #609 from dmick/wip-6293
mon: fix wrong arg to "instructed to" status message

Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-09-19 18:06:27 -07:00
Dan Mick
16ebb25f7c mon: fix wrong arg to "instructed to" status message
Fixes: #6293
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-09-19 16:05:01 -07:00
Loic Dachary
bcc1680ad2 mon: fix inverted test in osd pool create
When using the properties key=value only, the test was inverted
and an attempt to obtain a substring at index string::npos throws
an exception.

Add variations of osd pool create to qa/workunits/mon/pool_ops.sh
to assert the problem has been fixed and all code paths are used.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-20 00:33:13 +02:00
Noah Watkins
f3718c29bb code_env: use feature test for PR_GET_NAME support
Function `get_process_name` has platform specific dependencies. Check
for Linux prctl function and correct command flag.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-09-19 15:00:31 -07:00
Yehuda Sadeh
08fe028bad rgw: use bufferlist::append() instead of bufferlist::push_back()
push_back() expects char *, whereas append can append a single char.
Appending a NULL char to push_back is cast as a NULL pointer which is
bad.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-19 13:03:11 -07:00
Gary Lowell
5216ed134b Merge pull request #604 from ceph/wip-buck-centos-core
Wip buck centos core
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-09-19 13:01:00 -07:00
Sage Weil
fd6646f256 Makefile: fix unittest_arch
Also broken by makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 12:52:53 -07:00
Sage Weil
5421d6da2c Makefile: fix unittest_crc32c
This got dropped during the makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 08:48:23 -07:00
Loic Dachary
4c9497f9be ErasureCode: complete plugin loader unit tests
* TestErasureCodePluginExample.cc is renamed to TestErasureCodePlugin.cc
  because it's not limited to the example which is really used to
  support tests rather than being tested.

* Bugous plugins are added to exhibit failures and enable the unit tests
  to check they are handled as expected

  ErasureCodePluginFailToInitialize : the entry point returns != 0
  ErasureCodePluginFailToRegister : the plugin registry is not updated
  ErasureCodePluginMissingEntryPoint : the shared library has no entry
  point

* It would be difficult to prove that the mutex protecting against
  multiple loads actually does what it is expected to because of the
  lack of thread introspection functions such as : tell me if this
  thread is waiting on this mutex. A simpler approach is chosen : create
  a thread that blocks forever when loading ( that's what the delay in
  the example plugin is for ) and then check that the lock has indeed
  been acquired. Since this mutex is merely about making sure that only
  one thread at a time runs this sequence of code, it's probably enough.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00
Loic Dachary
7324931d5e ErasureCode: plugin loading in progress flag
The bool loading data member of ErasureCodePluginRegistry is
set to true when a plugin is being loaded, to provide an observable side
effect for test purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00
Loic Dachary
def05f06ed ErasureCode: improve API implementation example
* minimum_to_decode and minimum_to_decode_with_cost are replaced with
  meaningfull examples instead of placeholders

* encode and decode are commented and hard coded constants are replaced
  by defines for readability

* run against valgrind

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00
Loic Dachary
d8b55837fd ErasureCode: proofread abstract API documentation
* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
  possible the output arguments will just point to the input
  argument. This must be documented as any side effect on the input
  argument may modify the output argument

* Fix typos

* Fix may/could/must/should to better reflect what's mandatory and
  what's not.

* Reword the explanation of minimum_to_decode_with_cost to not suggest
  an implementation. This will need to be revisited anyway, when the
  semantic of the cost is defined.

* Explain chunk size constraints

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00
Yan, Zheng
c63b4edcdc mds: allow delay in evaluating stray
Add a new parameter 'delay' to MDCache::eval_stray(). If 'delay'
is true, MDCache::eval_stray() adds the stray dentry to a delayed
list. Delayed stray dentries are processed in MDCache::trim().

This change is required by later commit that evaluates stray when
reference to cache object is released.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-09-19 14:01:02 +08:00
Yan, Zheng
298c39f2f5 mds: touch dentry bottom recursively
Deleted directory inode's dirfrags may contain some null dentries.
When touch_dentry_bottom() is called, also move these null dentries
to the tail of LRU.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-09-19 14:01:02 +08:00
Yan, Zheng
e303b964f7 mds: re-integrate stray when link count >= 1
no reason not to rename inode out of the stray directory if the
inode's link count > 1

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-09-19 14:01:02 +08:00
Yan, Zheng
862e0f12a6 mds: fix MDCache::truncate_inode_finish() journal
we should add projected parent directory's context to the journal

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-09-19 14:01:02 +08:00
Sage Weil
96010924cb os/FileStore: fix uninitialized var
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-18 20:38:51 -07:00
Yan, Zheng
b66ac77fa7 osdc/ObjectCacher: finish contexts after dropping object reference
The context to finish can be class C_Client_PutInode, which may drop
inode's last reference. So we should first drop object's reference,
then finish contexts.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-09-18 13:26:30 -07:00
Sage Weil
ce723b5ad6 doc/release-notes: v0.69
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-18 12:31:42 -07:00
Gary Lowell
33671f3554 Merge branch 'next' 2013-09-18 09:11:02 +00:00
Gary Lowell
6ca6f2f9f7 v0.69 2013-09-18 01:40:51 +00:00
Gregory Farnum
b37f88c92d Merge pull request #586 from ceph/wip-copyfrom-big
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-09-17 11:14:26 -07:00
Sage Weil
a80f831b1f ceph_test_rados: identify write seq_num in output
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:28 -07:00
Sage Weil
3a00187860 librados: test copy_from without src_version specified
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:28 -07:00
Sage Weil
045b90292a osd: allow a copy_from without knowing the src_version
If we don't specify the version up front, learn the version after the first
chunk and enforce it thereafter to ensure we do not get torn content.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:28 -07:00
Sage Weil
83f12e4630 ceph_test_rados: submit a racing read with every COPY_FROM
Verify that the racing read completes after the COPY_FROM does (i.e., is
blocked by it).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
d050596a0d ceph_test_rados: use get_version64() throughout
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
cdc637f0f1 osd: block requests on object during COPY_FROM
Block any request on an object (read or write) during the COPY_FROM
operation.

This could potentially be broken down into read vs write operations without
much difficulty, but blocking any op indescriminately is sufficient for
now, so let's keep it simple.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
f97277cc50 osd: add infrastructure to block io on an obc
Add an is_blocked() method for the obc, and add infrastructure to block
any operations if it returns true.  Clean up on_change(), and add a helper
to kick an obc when whatever condition leading to it being blocked is no
longer true.

For now, is_blocked() is always false...

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
df7c36ac08 osd/ReplicatedPG: factor some bits into finish_copy
This is a bit cleaner and hopefully more usable for osd-driven cache
promotion.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
5921703eb5 ceph_test_rados: more readable output
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
Sage Weil
4e29e362e7 osd/ReplicatedPG: stage object chunks to replicas during COPY_FROM
As we get each chunk of data during the COPY_FROM operation, write it out
to a temporary object on the replicas.  When we get all the pieces, move
it into place.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 11:06:27 -07:00
John Wilkins
1f80d63272 doc: Replaced code-block with inline literal to fix auto numbering.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-17 10:39:24 -07:00
John Wilkins
7d5dfa2b58 doc: Made s3gw.fcgi paths consistent.
fixes: #6182

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-09-17 10:34:47 -07:00
Joao Eduardo Luis
0d20cae0be mon: OSDMonitor: multiple rebuilt full maps per transaction
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-09-17 17:58:20 +01:00
Alexandre Oliva
59147be9ae osd: compute full ratio from kb_avail
On btrfs, kb_used + kb_avail can be much smaller than total kb, and
what really matters to avoid filling up the disk is how much space is
available, not how much we've used.  Thus, compute the ratio we use to
determine full or nearfull from kb_avail rather than from kb_used.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-17 06:31:48 -07:00
Loic Dachary
89e8b8be2f ErasureCode: improve API implementation example
* minimum_to_decode and minimum_to_decode_with_cost are replaced with
  meaningfull examples instead of placeholders

* encode and decode are commented and hard coded constants are replaced
  by defines for readability

* run against valgrind

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-17 10:58:26 +02:00
Loic Dachary
3966e6ea06 ErasureCode: proofread abstract API documentation
* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
  possible the output arguments will just point to the input
  argument. This must be documented as any side effect on the input
  argument may modify the output argument

* Fix typos

* Fix may/could/must/should to better reflect what's mandatory and
  what's not.

* Reword the explanation of minimum_to_decode_with_cost to not suggest
  an implementation. This will need to be revisited anyway, when the
  semantic of the cost is defined.

* Explain chunk size constraints

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-17 10:58:26 +02:00
Joe Buck
971bf60b39 Remove unneeded junit4 check
We refactored the java tests to not use
the ExternalResource class, so this test
is no longer necessary.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-09-16 22:07:02 -07:00
Joe Buck
e38bd8d5ff Removing extraneous code
The ExternalResource code was unnecessary and caused
issues on CentOS. Removing it.
Update Makefile.am to reflect the fact that
an anonymous class was removed and its
$1.class file is no longer generated.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-09-16 22:03:34 -07:00
Joe Buck
cd6f4bcdae Use a loop for testing jdk paths
Loop through a list of sensible default
locations for a JDK, stopping if a
workable JDK is found.
Also, add support for CentOS' default
java location.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-09-16 22:02:59 -07:00