Danny Al-Gaaf [Fri, 10 Apr 2015 09:25:12 +0000 (11:25 +0200)]
test_async_driver.cc: fix UNINIT
Fix for:
CID 1254380 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value sa. Field
sa.sin_zero is uninitialized when calling connect
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Wed, 18 Mar 2015 14:03:28 +0000 (15:03 +0100)]
rgw_rest_user.cc: UserQuotas init vars in ctor init list
Fix for:
[src/rgw/rgw_rest_user.cc:631]: (performance) Variable 'bucket_quota' is
assigned in constructor body. Consider performing initialization in
initialization list.
[src/rgw/rgw_rest_user.cc:632]: (performance) Variable 'user_quota' is
assigned in constructor body. Consider performing initialization in
initialization list.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 17 Mar 2015 21:58:19 +0000 (22:58 +0100)]
libcephfs.h: fix unnecessary forward declarations
This is an issue in case non-cpp code. Move the declaration of
inodeno_t and vinodeno_t structs into __cplusplus block where
they are needed.
Fix for cppcheck issue:
[src/include/cephfs/libcephfs.h:89] -> [src/include/cephfs/libcephfs.h:74]:
The struct 'inodeno_t' forward declaration is unnecessary. Type struct is
already declared earlier.
[src/include/cephfs/libcephfs.h:93] -> [src/include/cephfs/libcephfs.h:83]:
The struct 'vinodeno_t' forward declaration is unnecessary. Type struct is
already declared earlier.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 17 Mar 2015 16:12:04 +0000 (17:12 +0100)]
rgw_rest_log.h: remove http_ret from some RGWOp_*_list classes
Remove http_ret from child class since there is already an integer
with the same name in the parent/base class.
Fix for:
[src/rgw/rgw_rest_log.h:79] -> [src/rgw/rgw_rest.h:275]: (warning) The
class 'RGWOp_MDLog_List' defines member variable with name 'http_ret'
also defined in its parent class 'RGWRESTOp'.
[src/rgw/rgw_rest_log.h:99] -> [src/rgw/rgw_rest.h:275]: (warning) The
class 'RGWOp_MDLog_Info' defines member variable with name 'http_ret'
also defined in its parent class 'RGWRESTOp'.
[src/rgw/rgw_rest_log.h:182] -> [src/rgw/rgw_rest.h:275]: (warning) The
class 'RGWOp_DATALog_List' defines member variable with name 'http_ret'
also defined in its parent class 'RGWRESTOp'.
[src/rgw/rgw_rest_log.h:202] -> [src/rgw/rgw_rest.h:275]: (warning) The
class 'RGWOp_DATALog_Info' defines member variable with name 'http_ret'
also defined in its parent class 'RGWRESTOp'.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: set '--cluster=ceph' in 'prepare' subcommand
otherwise the 'ceph' default value won't be catched by "main_prepare()",
this breaks TEST_corrupt_and_repair_replicated. seems the behaviour
was changed in python 2.7.9, so we move the default value to where
the '--cluster' argument is added instead of setting it in the
main argument parser.
Ken Dreyer [Tue, 14 Apr 2015 16:22:37 +0000 (10:22 -0600)]
Merge pull request #4359 from ceph/wip-fix-ceph-dencoder-build-master
Move ceph-dencoder build to client
Rework mds/Makefile.am to support a dencoder client build
rgw/Makefile.am: Populate DENCODER_SOURCES properly
Dencoder should never be built with tcmalloc
Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Boris Ranto [Mon, 13 Apr 2015 13:07:03 +0000 (15:07 +0200)]
Rework mds/Makefile.am to support a dencoder client build
The patch adds all the mds sources to DENCODER_SOURCES to allow a
dencoder client build. The patch also splits the Makefile.am file to
better accomodate the change.
Dencoder is built if ENABLE_CLIENT is set. However, the rgw/Makefile.am
populated DENCODER_SOURCES only if WITH_RADOSGW was set. The patch fixes
this and populates DENCODER_SOURES if ENABLE_CLIENT is set.
Yehuda Sadeh [Fri, 27 Mar 2015 23:32:48 +0000 (16:32 -0700)]
rgw: generate new tag for object when setting object attrs
Fixes: #11256
Backport: firefly, hammer
Beforehand we were reusing the object's tag, which is problematic as
this tag is used for bucket index updates, and we might be clobbering a
racing update (like object removal).
Ken Dreyer [Mon, 13 Apr 2015 15:43:11 +0000 (09:43 -0600)]
packaging: ship systemd/ceph.tmpfiles.d in tarballs
Prior to this commit, the tarballs did not contain
any files under the top-level "systemd" directory. This caused problems
with RPM builds on Fedora and RHEL 7, because as of commit aa88364f30e2d2f254ade185a83ba263b48e2a73, those RPMs depend on the
systemd/ceph.tmpfiles.d file.
(Longer-term we might want to improve the tarball generation code to be
less complex/manual.)
http://tracker.ceph.com/issues/11383 Refe: #11383
Reported-by: Greg Farnum <gfarnum@redhat.com> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
It is not enough for the backports to be available, they also need to be
explicitly allowed to take precedence whenever a package is installed
indirectly. This is causing problems with libp11-kit-dev pulled by
libcurl4-gnutls-dev.
Jason Dillaman [Fri, 6 Mar 2015 20:40:48 +0000 (15:40 -0500)]
tests: librados_test_stub reads should deep-copy
If a client of librados_test_stub modified a bufferlist
retrieved via a read call, the client will actually be
changing the contents of the file. Therefore, read calls
should deep-copy the contents of the buffer::ptrs.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 20 Mar 2015 03:29:44 +0000 (23:29 -0400)]
cls_rbd: treat zero-byte object maps as missing
Acquiring the lock on a missing object map will create an
empty object. Treat the empty object as a non-existant
object map to support rebuilding corrupt object maps while
holding the exclusive lock.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 19 Mar 2015 19:33:07 +0000 (15:33 -0400)]
librbd: added RebuildObjectMapRequest state machine
It will verify the object map is properly sized, verify
the existence of each object within the image (snapshot),
and clear the invalid object map flag once complete.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 20 Mar 2015 16:16:14 +0000 (12:16 -0400)]
librbd: correct basic object map errors during refresh
If the object map is corrupt on-disk or too small for the image,
correct these basic issues as soon as possible. The object map
is still flagged as invalid, but there will be less required repair
work if future IO is able to properly update the object map.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Wed, 18 Mar 2015 15:51:47 +0000 (11:51 -0400)]
librbd: use generic helper for issuing async requests
resize, flatten, and rebuild object map now use the same
bootstrap code for sending the request to the remote lock owner
or executing the request locally.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 10 Apr 2015 16:37:05 +0000 (12:37 -0400)]
librbd: failure to update the object map should always return success
If an object map update fails, the object map will be flagged as
invalid. However, if a subsequent update failure occurs, the error
code will propagate back to the caller.
Fixes: #11369 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 6 Mar 2015 20:40:48 +0000 (15:40 -0500)]
tests: librados_test_stub reads should deep-copy
If a client of librados_test_stub modified a bufferlist
retrieved via a read call, the client will actually be
changing the contents of the file. Therefore, read calls
should deep-copy the contents of the buffer::ptrs.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>