Fix for Swift key command

When creating a secret key for the Swift user, the command without the --gen-secret option generates an empty key.
buffer: uninline, constify crc32c()

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: make initial journal files 0 bytes

The ceph-osd will resize journal files up and properly fallocate() them
so that the blocks are preallocated and (hopefully) contiguous.  We
don't need to do it here too, and getting fallocate() to work from
python is a pain in the butt.

Fixes: #5981
Signed-off-by: Sage Weil <sage@inktank.com>
common: fix Mutex, Cond no-copy declarations

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: make busy creating pgs message more explicit

Fixes: #6287
Signed-off-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: smaller transactions when rebuilding full versions

Otherwise, for considerably sized rebuilds, the monitor will not only
consume vast amounts of memory, but it will also have troubles committing
the transaction.  Anyway, it's also a good idea to adjust transactions to
the granularity we want, and to be fair we care that each rebuilt full map
gets to disk, even if subsequent full maps don't (those can be rebuilt
later).

Fixes: #6323

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: update latest_full while rebuilding full maps

Not doing so will make the monitor rebuild the osdmap full versions, even
though they may have been rebuilt before, every time the monitor starts.

This mostly happens when the cluster is left in an unhealthy state for
a long period of time and incremental versions build up.  Even though we
build the full maps on update_from_paxos(), not updating 'full_latest'
leads to the situation initially described.

Fixes: #6322

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
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>
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>
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>
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>
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>
mon: OSDMonitor: multiple rebuilt full maps per transaction

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
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>
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>
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>
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>
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>
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>
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>