common: seq_read_bench argument order changed
The argument order for seq_read_bench in src/common/obj_bencher.h has
been changed to match the argument order in obj_bencher.cc

Calls to seq_read_bench already use the correct order.
seq_read_bench also matches the order of rand_read_bench and
write_bench

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
rbdmap: per-device post-map/pre-unmap hooks

There are cases when automatic (un-)mounting of file system on RBD is not
enough. Some services may need to be started when RBD device becomes
available (mapped) as well as it may be desirable to stop services in order
to release file system before unmapping RBD device.

File system(s) on RBD is not the only use case scenario. RBD devices may be
used as block devices in which case `/etc/fstab` is not sufficient to
perform action upon mapping RBD device. A handler script (hook) can be
useful to properly release RBD device before unmapping, etc.

Pre-unmap hooks can be important for clean shut down and for re-exporting
RBD device(s) as (iSCSI,AoE,DRBD) etc.

This commit introduces support for per-device hooks to perform per-device
post-map/pre-unmap actions. If hook named like "poolname/imagename" (same
as in `/etc/ceph/rbdmap` file) is found in

    /etc/ceph/rbd.d/poolname/imagename

it is executed as

    /etc/ceph/rbd.d/poolname/imagename map poolname/imagename

following after attempt to mount file system (if relevant `fstab` entry
exist) following mapping of corresponding RBD device.

Before un-mounting file system and un-mapping RBD device hook is called as
follows:

    /etc/ceph/rbd.d/poolname/imagename unmap poolname/imagename

Second argument is intentional to allow multiple RBD devices to share the
same hook (symlinked under different names).

Sample hook to use RBD device as "mdadm" hot spare may look like this:

~~~~
DEV="$2"
case "$1" in
    "map")
        mdadm /dev/md2 --add --write-mostly "${DEV}"
    ;;
    "unmap")
        mdadm /dev/md2 --fail "${DEV}"
        sleep 2
        mdadm /dev/md2 --remove "${DEV}"
    ;;
esac
~~~~

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
XfsFileStoreBackend: default to disabling extsize on xfs

This appears to be responsible for the deep scrub mismatches on some rbd
workloads.

Fixes: 8830
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2103 from ceph/wip-8830

XfsFileStoreBackend: default to disabling extsize on xfs

Reviewed-by: Sage Weil <sage@redhat.com>
debian: move ceph-dencoder to ceph from ceph-common

It links against the world currently (notably leveldb).  Not nice for the
client-side lib.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph.spec: move ceph-dencoder to ceph from ceph-common

Signed-off-by: Sage Weil <sage@redhat.com>
update hadoop-wordcount test to be able to run on hadoop 2.x. The hadoop and mapreduce library are no longer hard coded so they can be specified to point to the right path. The relative paths hdfs are changed to absolute paths.
A sample command to run the test on hadoop 2.x is
TESTDIR=/home/test HADOOP_HOME=/usr/lib/hadoop HADOOP_MR_HOME=/usr/lib/hadoop-mapreduce sh workunits/hadoop-wordcount/test.sh starting hadoop-wordcount test

Signed-off-by: rootfs <hchen@redhat.com>
Fix size of network protocol intergers.

This fixes the size of some integers that are visible in the network
protocol.  There should be no change for machines where sizeof(int) ==
4.

Signed-Of-By: Kevin Cox <kevincox@kevincox.ca>
init-ceph: wrap daemon startup with systemd-run when running under systemd

We want to make sure the daemon runs in its own systemd environment.  Check
for systemd as pid 1 and, when present, use systemd-run -r <cmd> to do
this.

Probably fixes #7627

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Tested-by: Dan Mick <dan.mick@inktank.com>
rgw: don't try to wait for pending if list is empty

Fixes: #8846
Backport: firefly, dumpling

This was broken at ea68b9372319fd0bab40856db26528d36359102e. We ended
up calling wait_pending_front() when pending list was empty.
This commit also moves the need_to_wait check to a different place,
where we actually throttle (and not just drain completed IOs).

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #2095 from onlyjob/rbdmap

rbdmap: per-device post-map/pre-unmap hooks

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #2110 from ceph/wip-8846

rgw: don't try to wait for pending if list is empty

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
rgw: don't try to wait for pending if list is empty

Fixes: #8846
Backport: firefly, dumpling

This was broken at ea68b9372319fd0bab40856db26528d36359102e. We ended
up calling wait_pending_front() when pending list was empty.
This commit also moves the need_to_wait check to a different place,
where we actually throttle (and not just drain completed IOs).

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit f9f2417d7db01ecf2425039539997901615816a9)
Merge remote-tracking branch 'gh/next'
mon/MDSMonitor: make legacy 'newfs' command idempotent

We need to return success if we get a dup command.  Simply check whether
the fs is already enabled with the same pools and name.

Fixes: #8857
Signed-off-by: Sage Weil <sage@redhat.com>
vstart.sh: default to 3 osds

Signed-off-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: add "osd pool get <pool> erasure_code_profile" command

Enable us to obtain the erasure-code-profile for a given erasure-pool.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/cephtool/test.sh: test osd pool get erasure_code_profile

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #2113 from ceph/wip-8857

mon/MDSMonitor: make legacy 'newfs' command idempotent

Reviewed-by: John Spray <john.spray@redhat.com>
qa/workunits/cephtool/test.sh: fix erasure_code_profile get test

I broke this in ce9f12d7a2202948532fed9da4d763ed03f6b8fa (the pool isn't
type erasure).

Signed-off-by: Sage Weil <sage@redhat.com>