systemd support in ceph-disk activate

previous code just fails for systemd with an error

Signed-off-by: Owen Synge <osynge@suse.com>
doc: Add file system osd config settings
Add documentation for osd mkfs and osd mount options.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
rgw: Export user stats in get-user-info Adminops API

Fixes: #9359

Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
rgw: PutObjMetadata, clear bufferlist before appending into it

Fixes: #9576
Backport: firefly, dumpling

We need to completely rewrite the bufferlist, not append into it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: rados->set_attrs() updates bucket index

Fixes: #5595
Backport: dumpling, firefly
We need to update the bucket index when updating object attrs, otherwise
we're missing meta changes that need to be registered. It also
solves issue of bucket index not knowing about object acl changes,
although this one still requires some more work.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
ReplicatedPG: Make pull and push op use sparse read

If user enable fiemap feature in osd side, there exists three ways to make
read/write sprase:

1. normal sparse read/write op
2. clone op
3. recover op

If any op doesn't support sparse way, it will destroy the advantage of this
way and write zero hole to sparse file. Now clone op can support sparse write,
this commit implement sparse read/write for recover op.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
ReplicatedPG: Make the size of recovery object same as origin obj

When doing sparse read/write for recovery, it may cause size inconsistence
between actual obj and recovery obj.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
rgw: swift GET / HEAD object returns X-Timestamp field

Fixes: #8911
Backport: giant, firefly, dumpling
Swift clients expect X-Timestamp header, dump it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: correct "If-Modified-Since" handle.

Normally client will use `Last-Modified` of server returned, as the
value of `If-Modified-Since`. So the `ctime` is exactly equal to
`*mod_ptr`, and rgw should return `Not Modified`, otherwise the cache
will never worked.

Signed-off-by: VRan Liu <gliuwr@gmail.com>
mon: fix formatted 'pg stat'

Previously it did a full pg dump, which is almost certainly not what the
user wants.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: fix {recovery,degraded,unfound}_ratio units, type

These are floats, and *not* percentages!

Signed-off-by: Sage Weil <sage@redhat.com>
common/Formatter: fix JSON dump of floating point values

These are numbers -- they should not be quoted.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: log when scrub,deep scrub, repair starts

So it can be matched, in the logs, with the log messages announcing it
is complete.

http://tracker.ceph.com/issues/9817 Fixes: #9817

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
fix can not disable max_size quota

Currently if we enable quota and set max_size = -1, it doesn’t
mean max_size is unlimited as expected. Instead, it means object
with any size is not allowed to upload because of “QuotaExceeded”.
The root cause is the function rgw_rounded_kb which convert max_size
to max_size_kb returns 0 for -1 because it takes an unsigned int
but we pass an int to it. A simple fix is check max_size before
it’s rounded to max_size_kb.

Test case:
1 enable and set quota:
radosgw-admin quota enable --uid={user_id} --quota-scope=user
radosgw-admin quota set --quota-scope=user --uid={user_id}\
 --max-objects=100 --max-size=-1
2 upload any object with non-zero length
it will return 403 with “QuotaExceeded” and return 200 if you apply the fix.

Fixes: #9907
Backport: giant, firefly
Signed-off-by: Dong Lei leidong@yahoo-inc.com
osd: cache pool: delete dead code in ReplicatedPG::agent_choose_mode

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
librbd: Refactor librbd unit tests to use test fixtures

Current librbd unit tests create and destroy pools for each
test.  By migrating to a test fixture, the same pool(s) are
now used for all tests within a test case.  This speeds up
the runtime of the librbd tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
librbd: don't close an already closed parent image upon failure

If librbd is not able to open a child's parent image, it will
incorrectly close the parent image twice, resulting in a crash.

Fixes: #10030
Backport: firefly, giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Fix tests on btrfs: leftover subvolumes removed

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
tools: fix MDS journal import

Previously it only worked on fresh filesystems which
hadn't been trimmed yet, and resulted in an invalid
trimmed_pos when expire_pos wasn't on an object
boundary.

Fixes: #10025

Signed-off-by: John Spray <john.spray@redhat.com>
tools: persist trimmed_pos in journal dump

...rather than inferring something from expire_pos
that could leave trash behind in the range between
the original trimmed_pos and expire_pos.

Be backward compatible with old journal dumps
so that if someone is updating for other reasons
like getting better tools, they can still import
their journal.

Signed-off-by: John Spray <john.spray@redhat.com>