Merge pull request #1906 from ceph/wip-runxfstests

wip-runxfstests

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1896 from ceph/wip-8452

rgw: fetch object attrs on multipart completion

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1907 from ceph/wip-8311

rgw: if extra data pool name is empty, use data pool name instead

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Fix keyvaluestore fiemap bug

The result of fiemap is wrong and the offset get from
"StripObjectMap::file_to_extents" need to multiply by sequence number

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
bloom_filter, add assertion to test validate element_count()

Adds to TEST(BloomFilter, Basic) a new assertion
to verify the good behavior of the method 'element_count()'.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
bloom_filter, remove unecessary operators

Removes 3 not used operators (intersect, union,
and diff) since after use those methods fpp and is_full are
corrupted.

Fixes: #8476
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
bloom_filter, add test to validate assignement operator

Adds a test to ensure the good behavior of the
operator assignement.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Merge pull request #1889 from sahid/master

trim dead code and add tests in bloom_filters

Reviewed-by: Loic Dachary <loic@dachary.org>
automake: add dummy.cc to fix 'make tags'

Commit 421e6c561704 ("test_librbd_fsx: add krbd mode support") added
a requirement for ceph_test_librbd_fsx to be linked with a C++ linker.
Implement it in a way that doesn't break 'make tags'.

Fixes: #8530
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Remove unused variables in MemStore.cc

Removes two unused variables expected_object_size and
expected_write_size in MemStore.cc

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Remove unused variables in KeyValueStore.cc

Removes two unused variables expected_object_size and
expected_write_size in KeyValueStore.cc

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
rgw: set meta object in extra flag when initializing it

As part of the fix for 8452 we moved the meta object initialization.
Missed moving the extra flag initialization that is needed. This breaks
setups where there's a separate extra pool (needed in ec backends).

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #1914 from ceph/wip-autotools-dummy

automake: add dummy.cc to fix 'make tags'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
daemon_config.cc: add some more asserts

Add assert checks for some more set_val() calls to fix cppcheck issue
"Variable 'ret' is reassigned a value before the old one has been used"

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #1916 from sahid/unused

Remove unused variables on MemStore.cc and KeyValueStore.cc

Reviewed-by: Loic Dachary <loic@dachary.org>
common/addr_parsing.c: fix realloc memory leak

Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.

Use a temporary pointer to hold the result of realloc(). In error case
print error and exit, otherwise assign it to the pointer we want to realloc.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
libs3: update to latest git master of ceph/libs3

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/librbd/fsx.c: fix gcc warning

Initialize pointer with NULL before call posix_memalign() to fix
gcc warning:

test/librbd/fsx.c:1402:13: warning: ‘temp_buf’ may be used
 uninitialized in this function [-Wmaybe-uninitialized]
  if ((ret = ops->read(&cur_ctx, 0, file_info.st_size, temp_buf)) < 0) {
             ^
test/librbd/fsx.c:1398:13: warning: ‘good_buf’ may be used
 uninitialized in this function [-Wmaybe-uninitialized]
  if ((ret = pread(fd, good_buf, file_info.st_size, 0)) < 0) {

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librbd/internal.cc: check earlier for null pointer

Fix potential null ponter deref, move check for 'order != NULL'
to the beginning of the function to prevent a) deref in ldout() call
and b) to leave function as early as possible if check fails.

[src/librbd/internal.cc:843] -> [src/librbd/internal.cc:865]: (warning)
 Possible null pointer dereference: order - otherwise it is redundant
 to check it against null.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/KeyValueStore.cc: fix possible null pointer deref warning

Add assert check for header->header and remove redundant 'if'
check for header again later.

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