ceph-test.install:  Add libcephfs-test.jar to package.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
fix ceph-object-corpus submodule commit

Broken by 58f4cd53b9a29ec16c863fde8e790381dee20253

Signed-off-by: Sage Weil <sage@inktank.com>
Merge branch 'wip-4222'

Fix for Bug 4222.  Add libcephfs-test.jar to the ceph-test package.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
ceph.spec.in: add new Requires from ceph-disk-prepare

Added new Requires from ceph-disk-prepare: cryptsetup, gptfdisk,
parted and util-linux.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CDentry.h: use static_cast instead of C-Style cast

Use static_cast<T>() instead of C-Style cast.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CInode.h: use static_cast instead of C-Style cast

Use static_cast<const T>() instead of C-Style cast. Change CInode* to
const, since it never changed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
cls_rbd.cc: remove unused variable

Remove unused variable 'len', left over from commit
0b0009cfe8429072ba2af6f6843537d5501b27c3.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
cls_rbd.cc: remove another unused variable

Remove 'new_snaps' since it only used for a sizeof() call,
get the size directly from the data type of new_snaps instead.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
crush/builder.c: fix sizeof handling of bucket->h.items

Fix sizeof handling for realloc/malloc of bucket->h.items. items are
of type __s32 and not __u32 (sizeof gives the same size, but fix it
to represent the correct type).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
crush/builder.c: fix realloc handling

Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.

Use a temporary pointer to hold the result of realloc(). In error case
return -ENOMEM, otherwise assign it to the pointer we want to realloc.

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

crush/builder.c: fix realloc handling

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #82 from dalgaaf/wip-da-spec

ceph.spec.in: add new Requires from ceph-disk-prepare

Reviewed-by: Sage Weil <sage@inktank.com>
librados/RadosClient.cc: use static_cast instead of C-Style cast

Use static_cast<T>() instead of C-Style cast. Add some missing
includes to make the static_cast work.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librados/librados.cc: use static_cast instead of C-Style cast

Use static_cast<T>() instead of C-Style cast.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librados/librados.cc: don't check unsigned 'len' against less than zero

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librbd/internal.cc: reduce scope of 'int r'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librbd/internal.cc: remove unused variable total_write

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
FileJournal::wrap_read_bl: adjust pos before returning

Otherwise, we may feed an offset past the end of the journal to
check_header in read_entry and incorrectly determine that the entry is
corrupt.

Fixes: 4296
Backport: bobtail
Backport: argonaut
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
msg/Pipe: move setting of socket options into a common method

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>