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: 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>
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>
KeyValueStore: move buffers from strip_header to BufferTransaction

Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
mds: CInode: catch exception by reference, not value

CID 1251353

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
mds: remove dead code from inode_t::compare()

CID 1251354

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
common/Readahead: use correct lock when waiting on the pending ops

Readahead was using the incorrect lock with the pending condition,
resulting in a failed assertion.  It now uses the lock associated
with pending ops.

Fixes: #10045
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Merge pull request #2893 from ceph/wip-10045

common/Readahead: use correct lock when waiting on the pending ops

Reviewed-by: Sage Weil <sage@redhat.com>
osdc: Constrain max number of in-flight read requests

Constrain the number of in-flight RADOS read requests to the
cache size.  This reduces the chance of the cache memory
ballooning during certain scenarios like copy-up which can
invoke many concurrent read requests.

Fixes: #9854
Backport: giant, firefly, dumpling
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
bufferlist: Don't call rebuild(), c_strt() call it if bufferlist not contiguous.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Merge pull request #2873 from ceph/wip-rbd-test-fixtures

librbd: Refactor librbd unit tests to use test fixtures

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
librbd: Python unit tests now use unique pools and images

RBD python unit tests no longer utilize the 'rbd' pool for
test cases.  Instead, a new temporary pool is created and
deleted. Additionally, each unit test now uses a unique
image name to reduce the possibility of test case failures
affecting subsequent tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
osd/PGLog.cc: prefer empty() over size() for emptiness check

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
bench_log.cc: catch ceph::FailedAssertion exception

Fix for:

CID 717177 (#2-1 of 3): Uncaught exception (UNCAUGHT_EXCEPT)
 root_function: In function main(int, char const **) an exception of
 type ceph::FailedAssertion is thrown and never caught.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rados_sync.cc: fix xattr_diff() for the only_in_b checks

In the checks to build only_in_b up the wrong const_iterator x is
build up. it should compare rhs->xattrs with xattrs entries and
not twice rhs->xattrs.

Fix for:

CID 716957 (#1 of 1): Invalid iterator comparison (MISMATCHED_ITERATOR)
 mismatched_comparison: Comparing x from rhs->xattrs to this->xattrs.end()
 from this->xattrs.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw_rados.cc: remove dead code

Fix for:

CID 1128391 (#1 of 1): Logically dead code (DEADCODE)
 dead_error_line: Execution cannot reach this statement goto done_err;

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/librados/c_read_operations.cc: fix invalid checks

Wrong variable for return of rados_getxattrs_next() and
rados_omap_get_next() used (len vs. val_len).

Fix for:

CID 1219464 (#1 of 1): Logically dead code (DEADCODE)
 dead_error_line: Execution cannot reach this expression
 key == NULL inside statement if (len == 0UL && key == NU...

CID 1219465 (#1 of 1): Logically dead code (DEADCODE)
 dead_error_line: Execution cannot reach this expression
 key == NULL inside statement if (len == 0UL && key == NU...

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osd/ReplicatedPG.cc: remove redundant check

Fix for:

[src/osd/ReplicatedPG.cc:2171]: (style) Redundant checking of STL
 container element existence before removing it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/librbd/librbd.cc: fix potential null pointer deref

Fix potential deref after null check. Move check for max_snaps in
rbd_snap_list up to fail early before call any functions.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>