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>
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>
msg/Pipe: allow tuning of TCP receive buffer size

Performance tests on high-end machines have indicated the Linux autotuning
of the receive buffer sizes can cause throughput collapse.  See bug
#2100, and this email discussion:

   http://marc.info/?l=ceph-devel&m=133009796706284&w=2

Initially default to 0, which leaves us with the default.  We may adjust
the default in the future.

Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd: show retry attempt in MOSDOp operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
init-ceph: fix default admin socket path used for status

Signed-off-by: Sage Weil <sage@inktank.com>
init-ceph: kick off ceph-create-keys when starting mons

We don't have a particularly tidy way to kick off ceph-create-keys from
sysvinit.  So, do something simple, ugly, and functional: if we are
starting a mon, and it looks like a 'new' type that is in /var/lib/ceph,
then start ceph-create-keys too.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #84 from dalgaaf/wip-da-sca-style

Some more smaller fixes

Reviewed-by: Sage Weil <sage@inktank.com>
crush-map.rst: fix chooseleaf syntax in ssd example

Fixes: 4304
Backport: bobtail
Reviewed-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
osd: useful debugging for when we drop requests

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: include osdmap epoch in osd_op message operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>