Jason Dillaman [Tue, 7 Jul 2015 16:11:13 +0000 (12:11 -0400)]
WorkQueue: new PointerWQ base class for ContextWQ
The existing work queues do not properly function if added to a running
thread pool. librbd uses a singleton thread pool which requires
dynamically adding/removing work queues as images are opened and closed.
Fixes: #13636 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 9 Nov 2015 16:22:24 +0000 (11:22 -0500)]
librbd: fixed deadlock while attempting to flush AIO requests
In-flight AIO requests might force a flush if a snapshot was created
out-of-band. The flush completion was previously invoked asynchronously,
potentially via the same thread worker handling the AIO request. This
resulted in the flush operation deadlocking since it can't complete.
Fixes: #13726
Backport: infernalis, hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Douglas Fuller [Thu, 5 Nov 2015 00:58:12 +0000 (16:58 -0800)]
cls_rbd: change object_map_update to return 0 on success, add logging
The rbd_object_map_update class method returns the size of the data read
from the object map when no update is necessary. Change this to return 0
on success. Add error logging to differentiate error cases.
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Boris Ranto [Fri, 30 Oct 2015 17:33:36 +0000 (18:33 +0100)]
rbdmap: Move do_map and do_unmap shell functions to rbdmap script
This patch creates rbdmap shell script that is called from init-rbdmap
init script. The patch also renames src/rbdmap configuration file to
src/etc-rbdmap so that rbdmap shell script can be installed via build
system directly. Finally, the patch accomodates these changes in spec
file and build system.
Fixes: #13374 Signed-off-by: Boris Ranto <branto@redhat.com>
xiexingguo [Thu, 5 Nov 2015 14:59:00 +0000 (22:59 +0800)]
librados: wrongly passed in argument for stat command
The first argument of io_ctx_impl->stat() requires an obj(of type object_t), but an oid(of type string) is directly passed in instead. Fixes: #13703 Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Joaquim Rocha [Mon, 19 Oct 2015 13:31:45 +0000 (15:31 +0200)]
tools/rados/rados.cc: Write to different destinations
The write benchmark only writes the objects' contents, not the omap
nor the extended attributes, which is something also interesting to
measure depending on the cluster's configuration.
These changes add a way to specify where the contents should be
written, allowing to combine any of the destinations mentioned above.
Loic Dachary [Mon, 2 Nov 2015 23:21:51 +0000 (00:21 +0100)]
tests: test/librados/test.cc must create profile
Now that the create_one_ec_pool function removes the testprofile each
time it is called, it must create the testprofile erasure code profile
again for the test to use.
Loic Dachary [Mon, 2 Nov 2015 19:24:51 +0000 (20:24 +0100)]
tests: destroy testprofile before creating one
The testprofile erasure code profile is destroyed before creating a new
one so that it does not fail when another testprofile erasure code
profile already exists with different parameters.
This must be done when creating erasure coded pools with the C++
interface, in the same way it's done with the C interface.
Boris Ranto [Fri, 23 Oct 2015 14:39:16 +0000 (16:39 +0200)]
ceph.spec.in: We no longer need redhat-lsb-core
Drop the redhat-lsb-core dependency as it is no longer necessary on
fedora/rhel.
The other two init scripts do not use redhat-lsb-core either. The
init-ceph.in conditionally requires /lib/lsb/init-functions and does not
use any of the functions defined in that file (at least not directly).
The init-radosgw file includes /etc/rc.d/init.d/functions on non-debian
platforms instead of /lib/lsb/init-functions file so it does not require
redhat-lsb-core either.
Boris Ranto [Fri, 23 Oct 2015 13:31:27 +0000 (15:31 +0200)]
init-rbdmap: Rewrite to use logger + clean-up
This patch rewrites the init-rbdmap init script so that it uses logger
instead of the log_* functions. The patch also fixes various smaller
bugs like:
* MAP_RV was undefined if mapping already existed
* UMNT_RV and UMAP_RV were almost always empty (if they succeeded) ->
removed them
* use of continue instead RET_OP in various places (RET_OP was not being
checked after the switch to logger messages)
* removed use of DESC (used only twice and only one occurrence actually
made sense)
David Zafman [Fri, 30 Oct 2015 20:14:49 +0000 (13:14 -0700)]
Merge pull request #5783 from dzafman/wip-12738
Fix scrub error handling and log output
Add set-size and remove-clone-metadata to ceph-objectstore-tool
Fix trim_object() to not crash on corrupt snapset
Add scrub clones test and add clones to ceph-objectstore-tool test
Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Samuel Just <sjust@redhat.com>
David Zafman [Wed, 26 Aug 2015 20:58:09 +0000 (13:58 -0700)]
osd: Make the _scrub routine produce good output and detect errors properly
Catch decode errors so osd doesn't crash on corrupt OI_ATTR or SS_ATTR
Use boost::optional<> to make current state clearer
Create next_clone as needed using head/curclone
Add equivalent logic after getting to end of scrubmap.objects
Fixes: #12738 Signed-off-by: David Zafman <dzafman@redhat.com>
xiexingguo [Wed, 28 Oct 2015 06:26:42 +0000 (14:26 +0800)]
FileJournal:_fdump wrongly returns if journal is currently unreadable.
_fdump wrongly returns if journal is currently unreadable, and fix some other errors also. Fixes: #13626 Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Add a default quota config that is applied when no specific quota is
enabled. There are both per-bucket and per-user defaults. Defaults are
enabled if either max count or max size is enabled.
This fixes issues 12912 and 12997.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
Vicente Cheng [Wed, 28 Oct 2015 10:29:53 +0000 (18:29 +0800)]
ceph-disk: get Nonetype when ceph-disk list with --format plain on single device.
with dmcrypt device, ceph-disk list will get Nonetype with the real device
i.e. /dev/sdb1 for /dev/dm-1, `ceph-disk --list /dev/sdb1` will get Nonetype
that because the holder we query is `dm-x`, the devices includ the path
is `sdX`, it cannot match.
if we list format plain and meet dmcrypt device, query again with the
holder (dm-x).
Also change the list_devices() parameter to let other function to use it
easily.