os/FileJournal: stop aio completion thread *after* writer thread

The writer thread may submit a new aio to update the header in its
final moments before shutting down.  Do not stop the aio thread until after
that has happened or else we may not wait for those aio completions.

Signed-off-by: Sage Weil <sage@redhat.com>
Revert "os/FileJournal: For journal-aio-mode, don't use aio when closing journal."

This reverts commit e870fd09ce846e5642db268c33bbe8e2e17ffef2.

The aio completion thread will now wait for the final header update aio to
finish; this workaround is no longer necessary.

Signed-off-by: Sage Weil <sage@redhat.com>
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>
doc: Change listed RBD cache defaults to actual defaults

Signed-off-by: Adam Crume <adamcrume@gmail.com>
osdc: Fix ObjectCounter::_readx perf counters

Signed-off-by: Adam Crume <adamcrume@gmail.com>
librbd: Add read-ahead

Signed-off-by: Adam Crume <adamcrume@gmail.com>
client: Replace client readahead logic with Readahead

Signed-off-by: Adam Crume <adamcrume@gmail.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>
Clock: Using clock_gettime instead of gettimeofday in linux os.

The precision of utime_t is nsec. In func ceph_clock_now, it use
gettimeofday to set utime_t. But the precision of gettimeofday is
microseconds. In linux, the precision of clock_gettime is nsec.
So using clock_gettime install gettimeofday in order to get higer
precision.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call
fiemap.

When call fiemap, it need sync the file. Now it used fsync() to achieve
this. But for fiemap, there is a flag FIEMAP_FLAGS_SYNC which do the
same thing like fsync().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
PG: release backfill reservations if a backfill peer rejects

Also, the full peer will wait until the rejection from the primary
to do a state transition.

Fixes: #9626
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
mon: put 'ceph status' health items on separate lines

This makes it *way* easier to read.

Signed-off-by: Sage Weil <sage@redhat.com>
mon: put 'ceph status' quorum status on new line

Signed-off-by: Sage Weil <sage@redhat.com>
mon: break recovery status onto separate lines

This affects both the 'health' and 'pgmap' sections of 'ceph status'
output.

Signed-off-by: Sage Weil <sage@redhat.com>
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: do not queue the snap trimmer constantly

Previously, we continuously requeued the snap trimmer while in
TrimmingObjects.  This is not a good idea now that we try to
limit the number of snap trimming repops in flight and requeue
the snap trimmer directly as those repops complete.

Fixes: #9113
Backport: giant, dumpling, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: dump snap_trimq on pg query

Signed-off-by: Samuel Just <sam.just@inktank.com>