Merge pull request #2230 from ceph/wip-fsx-flatten

test_librbd_fsx: also flatten as part of randomize_parent_overlap

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2233 from majianpeng/fix1

os/chain_xattr: Remove all old xattr entry when overwrite the xattr.

Reviewed-by: Sage Weil <sage@redhat.com>
rgw: move generic server usage after all options

Since generic_server_usage() exits after printing the options, any other
help options should be printed before that. Now the help for radosgw
looks like the following:

```
usage: radosgw [options...]
options:
  --rgw-region=<region>     region in which radosgw runs
  --rgw-zone=<zone>         zone in which radosgw runs
  --rgw-socket-path=<path>  specify a unix domain socket path
  -m monaddress[:port]      connect to specified monitor
  --keyring=<path>          path to radosgw keyring
  --logfile=<logfile>       file to log debug output
  --debug-rgw=<log-level>/<memory-level>  set radosgw debug level
  --conf/-c FILE    read configuration from the given configuration file
  --id/-i ID        set ID portion of my name
  --name/-n TYPE.ID set name
  --cluster NAME    set cluster name (default: ceph)
  --version         show version and quit

  -d                run in foreground, log to stderr.
  -f                run in foreground, log to usual location.
  --debug_ms N      set message debug level (e.g. 1)

```
This should sync the help options displayed similar to man page options
in current master.  This should close documentation bugs #8112 & #8864

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
osd: inline require_osd_up_peer

There is only one caller.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: fix require_same_peer_instance from fast_dispatch

The mark-down of old peers needs to take the session_dispatch_lock in order
to safely clear the Session ref cycle.  However, for fast dispatch callers,
that lock is already held.  Pass a flag down from the callers indicating
whether we need to take the additional lock.

Fixes: #9096
Signed-off-by: Sage Weil <sage@redhat.com>
osd: fix some line wrapping

Signed-off-by: Sage Weil <sage@redhat.com>
osd/ReplicatedPG: only do agent mode calculations for positive values

After a split we can get negative values here.  Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.

Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2249 from ceph/wip-9096

osd: fix require_same_peer_instance from fast_dispatch

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
ceph-disk: display information about dmcrypted data and journal volumes

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-disk: add get_partition_base() helper

Return the base devices/disk for a partition device.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-disk: only fall back to sgdisk for 'list' if blkid seems old

If the blkid doesn't show us any ID_PART_ENTRY_* fields but we know it is
a GPT partition, *then* fallback.  Otherwise, don't bother.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-disk: warn about falling back to sgdisk (once)

This way the user knows something funny might be up if dmcrypt is in use.

Signed-off-by: Sage Weil <sage@redhat.com>
mds: Revert from mds_mksnap_ setting to mds_snap_ settings
Merge pull request #2222 from ceph/wip-9029

mds: Make min/max UID configurable for who is allowed to create a snapsh...

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2236 from ceph/wip-9055

ceph_test_rados_api_tier: fix cache pool cleanup during test

Reviewed-by: Samuel Just <sam.just@inktank.com>
mon: fix potential divide by zero on can_mark_{down,out}

Signed-off-by: Sage Weil <sage@redhat.com>
mon: fix divide by zero when pg_num adjusted and no osds

Fixes: #9101
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
mon: fix potential divide by zero on can_mark_{down,out}

Signed-off-by: Sage Weil <sage@redhat.com>
mon: fix divide by zero when pg_num adjusted and no osds

Fixes: #9052
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
tracing: bootstrap lttng-ust with mutex events

See src/tracing/README.md

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>