mds: avoid assert after suicide()

Fixes: #5079
Signed-off-by: Sage Weil <sage@inktank.com>
FileJournal: adjust write_pos prior to unlocking write_lock

In committed_thru, we use write_pos to reset the header.start value in cases
where seq is past the end of our journalq.  It is therefore important that the
journalq be updated atomically with write_pos (that is, under the write_lock).

The call to align_bl() is moved into do_write in order to ensure that write_pos
is adjusted correctly prior to write_bl().

Also, we adjust pos at the end of write_bl() such that pos \in [get_top(),
header.max_size) after write_bl().

Fixes: #5020
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
debian: make radosgw require matching version of librados2

...indirectly via ceph-common.  We get bad behavior when they diverge, I
think because of libcommon.la being linked both statically and dynamically.

Fixes: #4997
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
os/FileStore: print error code to log on replay guard failure

Signed-off-by: Sage Weil <sage@inktank.com>
Revert "test_filejournal.cc: cleanup memory in destructor"

The finish() method for Contexts calls delete this.

This reverts commit 36028916c4630ea66007760efed8fc6c441e7af5.

Fixes: #5075
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
test_filestore_idempotent_sequence: unmount prior to deleting store

FileStoreDiff umounts the stores in its destructor.

Also, DeterministicOpSequence handles deletes its passed
object store.

Fixes: #5076
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
os/FileStore: fix replay guard error msgs (again)

Signed-off-by: Sage Weil <sage@inktank.com>
udev: install disk/by-partuuid rules

Wheezy's udev (175-7.2) has broken rules for the /dev/disk/by-partuuid/
symlinks that ceph-disk relies on.  Install parallel rules that work.  On
new udev, this is harmless; old older udev, this will make life better.

Fixes: #4865
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
sysvinit: fix enumeration of local daemons when specifying type only

- prepend $local to the $allconf list at the top
- remove $local special case for all case
- fix the type prefix checks to explicitly check for prefixes

Fugly bash, but works!

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Merge branch 'next'
doc: Added fuse syntax to the fstab doc.

fixes: #3672

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Omitted literal syntax from toc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
librbd/internal.cc: fix resource leak

Call release() on librados::AioCompletion to free storage before
leave the loop or call new again.

CID 1021213 (#1 of 1): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rados_completion" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #296 from dalgaaf/wip-da-CID-1021213

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
mon: add 'compact' command

As in, 'ceph mon tell \* compact'

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
Client: get describe_layout by file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: fix typos

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get stripe_unit/stripe_count/object_size/pool_id by file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get file handle/path layout info

Signed-off-by: Andras Elso <elso.andras@gmail.com>
libcephfs: get replication factor of a file handle/path

Signed-off-by: Andras Elso <elso.andras@gmail.com>