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>
rgw: Export user stats in get-user-info Adminops API

Fixes: #9359

Signed-off-by: Ray Lv <raylv@yahoo-inc.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>
ceph-disk: set guid if reusing a journal partition

When reusing a journal partition (e.g. /dev/sda2) we should set a
new partition guid and link it correctly with the OSD. This way
the journal is symlinked by its persistent name and ceph-disk list
works correctly.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Avoid unused pg_to_acting_osds call in OSDMap::get_primary_shard for not ec pool

Signed-off-by: Dong Yuan <yuandong1222@gmail.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>
Revert "ceph_test_rados_api_*: expose nspace"

This reverts commit 977d289055d69ab8a7baaf7ef68c013019225833.

The nspace string doesn't need to be static because it isn't
set by a static function.
ceph_test_rados_api_*: expose RadosTest::nspace
Expose RadosTestEC::nspace
Rename others to nspace for consistency

Signed-off-by: David Zafman <dzafman@redhat.com>
test, key_value_store: Use pool rbd since no default data pool present

Signed-off-by: David Zafman <dzafman@redhat.com>
test: Handle destructor of KvStoreBench by adding io_ctx_ready bool

Signed-off-by: David Zafman <dzafman@redhat.com>
doc: Add namespace to description of rados_ioctx_t

Signed-off-by: David Zafman <dzafman@redhat.com>
pybind: Add previously missed basic namespace to python bindings

Signed-off-by: David Zafman <dzafman@redhat.com>
rados: Fix ObjectIterator instantiation to specify correct value_type

Signed-off-by: David Zafman <dzafman@redhat.com>
osd, osdc, librados, tools, rgw: Implement pgls of all namespaces

Add release note
New librados interface
New pg_nls_response_t over the wire protocol
Ignore internal namespace (.ceph_internal)
Enhance ObjListCtx to keep independent IoCtxImpl so nspace won't change out from under listing code
Add ListObject with private implementation ListObjectImpl to return from iterator
Add EINVAL error for old librados interface when LIBRADOS_ALL_NSPACES set
Add throw to old librados c++ interface when all_nspaces set

Fixes: #9031

Signed-off-by: David Zafman <dzafman@redhat.com>
rados command: Enhance ls output to show namespaces

Add rados --all option for ls to output all namespaces
Add rados --default option to cancel --all when in CEPH_ARGS environment

Fixes: #9031

Signed-off-by: David Zafman <dzafman@redhat.com>
test: New and updated testing for pgls of all namespaces

Add pg_nls_response_t encoding type ceph-dencoder
New test ceph_test_rados_api_nlist
Add check for throw of error and EINVAL in old test case
Change tests to use new librados list interfaces
Now flush_evict_all() can really evict all objects

Fixes: #9031

Signed-off-by: David Zafman <dzafman@redhat.com>
test: Improvements to allow more thorough clean up between tests

Remove snapshots at end of test so cleanup works
Fix test clean-up code to make sure ioctx is on SNAP_HEAD
Fix remaining test types to save and clean-up test namespace
Fix ceph_test_rados_api_tier so that clean-up of objects works
Do cleanup of base and cache pools after disconnecting tier
Add missing wait_for_latest_osdmap()
Add unwatch in watch_notify test so clean-up can remove objects without EBUSY

Signed-off-by: David Zafman <dzafman@redhat.com>
pybind, test: Use new rados_nobjects_list_open() variants

Add listing objects with namespaces to pybind rados testing

Signed-off-by: David Zafman <dzafman@redhat.com>
rados command: Minor namespace fixes

Fix rados cppool
Fix rados cp (add --target-nspace)
Add missing --target-locator to usage
Add namespace for clonedata operation
Improve some error message to include namespace

Fixes: #9262

Signed-off-by: David Zafman <dzafman@redhat.com>