librados: Fix typo for read functions documentation

Signed-off-by: David Zafman <david.zafman@inktank.com>
librados: Allow rados_pool_list() to get NULL buffer if len == 0

Coverity wants a NULL check for buf, but caller should be able to
pass a NULL buf and 0 len in order to get byte count of pool list.

Signed-off-by: David Zafman <david.zafman@inktank.com>
rbd: Prevent Seg fault by checking read result in snap_read_header()

Signed-off-by: David Zafman <david.zafman@inktank.com>
tools: Improve ceph_scratchtoolpp

Minor output improvements
Remove clone_range code that was asserting

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Fix Seg fault in ceph_test_rados

Fixes: #8049

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Fix appending write to return any error back to caller

Also, correct double bumping of num_writes

Signed-off-by: David Zafman <david.zafman@inktank.com>
mds: guarantee message ordering when importing non-auth caps

Current code allow importing non-auth caps when inode is being exported.
This can breaks message ordering because the corresponding cap import
messages are sent after the flush session messages. So they can arrive
at clients after clients have already received cap import messages from
new auth MDS of the inode.

The quick fix is ignore MExportCaps when inode is frozen.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mon/OSDMonitor: ignore boot message from before last up_from

It is possible we will have a dup OSDBoot message queued up in the mon
and will process it again after that osd was marked up and then down.  If
that happens, we should ignore this message, not mark the osd back in with
the same address.

Fixes: #8062
Signed-off-by: Sage Weil <sage@inktank.com>
librados, test: Have write, append and write_full return 0 on success

Fix consistency of write, append, write_full, all return 0 on success
Include C (rados_*) variants, C++ ctx variants
and aio get_return_value() and rados_aio_get_return_value()

Signed-off-by: David Zafman <david.zafman@inktank.com>
pybind: Check that "key" is a string

Signed-off-by: David Zafman <david.zafman@inktank.com>
pybind, test: Add python binding for append and add to test

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Add EC unaligned append write test to ceph_test_rados_api_io

Signed-off-by: David Zafman <david.zafman@inktank.com>
test, librados: aio read *return_value consistency, fix ceph_test_rados_api_aio

test:
  Add set_completion*PP() functions to cast arg to correct class
  Add return_value checks
  Add some reads with buffers larger than object size
  Check buffer length on reads
librados:
  Make sure *return_value() has bytes read in all cases

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Add multiple write test cases to ceph_test_rados_api_aio

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Add EC testing to ceph_test_rados_api_aio

Fixes: #7437

Signed-off-by: David Zafman <david.zafman@inktank.com>
mds: issue new caps before starting log entry

Locker::issue_new_caps() calls Locker::eval(), which may dispatch
other requests.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Merge pull request #1643 from ceph/wip-8062

mon/OSDMonitor: ignore boot message from before last up_from

Reviewed-by: Greg Farnum <greg@inktank.com>
mds: finish table servers recovery after creating newfs

Fixes: #8054
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Wordsmith the erasure-code doc a bit

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #1646 from dmick/wip-erasure-doc

doc: Wordsmith the erasure-code doc a bit.