We want these to be processed ahead of new client ops since
there are resources being held.
Fixes: 14313
Backport: hammer
Signed-off-by: Samuel Just <sjust@redhat.com>
submit_transaction takes ownership of the transaction implicitely. Make
this implicit using an rvalue ref to force usage of std::move and move
constructor.
Signed-off-by: Samuel Just <sjust@redhat.com>
This is better anyway, do_osd_op_effects on a non-client op was somewhat
silly without an op (even if you filled in the other fields like
watch_connects, it would just silently skip it). It also eliminates
another dependence of RepGather on OpContext.
Signed-off-by: Samuel Just <sjust@redhat.com>
execute_ctx is the only path which actually has a client op,
let's clarify eval_repop by moving that logic inline there.
This also eliminates most of the repop->ctx users from
eval_repop.
Signed-off-by: Samuel Just <sjust@redhat.com>
This way, we don't expose the RepGather structure
up into the users (which pretty much exclusively
use the repop->ctx member anyway). This will pave
the way to removing RepGather::ctx.
Part of this involves generalizing the repop callback
members (queue_snap_trimmer and on_applied) to
on_applied, on_committed, on_success, and on_finish
on both OpContext and RepGather.
Signed-off-by: Samuel Just <sjust@redhat.com>
When running the ceph_objectstore_tool test suite, we shall delete the btrfs
subvolumes that have been created before trying deleting the content unless that will generate a permission denied
issue.
Signed-off-by: Erwan Velu <erwan@redhat.com>
initialize MirrorImage::state to a certain value, otherwise the
generated test instances would be undetermined, and hence fail
the dencoder tests.
Signed-off-by: Kefu Chai <kchai@redhat.com>
While running a make check on a btrfs system, many subvolumes are let at the end
of the build. It's pretty common to have several hundreds of those.
btrfs is pretty sensible to the path when requesting a subvolume removal.
The current code was misleading the path and didn't deleted the remaining
volumes.
This patch list the current subvolumes, filter thoses created by the
test process and ajust the path because brtfs reports
erwan/chroot/ceph/src/testdir/test-7202/dev/osd1/snap_439
while regarding the current working directory we want to delete :
testdir/test-7202/dev/osd1/snap_439
Signed-off-by: Erwan Velu <erwan@redhat.com>
Default value of two async threads is enough for light workloads,
but is insufficient for heavy ones, reducing maximum throughput on
slower CPUs that have plenty of logical cores. Three async threads
give noticeable perf jump without any noticeable downsides.
Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
the destructor of Scrub::Store asserts that `this->results` should
always be empty when it is free'd. before this change, if we are
repairing, the results is not flushed or cleaned up, this crashes
osd daemon when a new PG internval comes. also we should not keep
the results around even we don't want to populate them to the omap
if we are repairing, it's just a waste.
Signed-off-by: Kefu Chai <kchai@redhat.com>
For the mon, using ps aux to find the process will only show part of the
command line and the $RUNID may be missing. For the OSD, the $RUNID is
passed using an environment variable and will not show at all.
There is no need to test both ceph-osd and ceph-mon since they both end
up in the same code path, pidfile_write. Add a log line that only shows
when the --pid-file is empty and grep for it in the simplest possible
way.
The TEST_pidfile test failed to kill a process because there was
no pidfile with its pid. This is fixed by backuping the pidfile before
it is modified.
http://tracker.ceph.com/issues/14834Fixes: #14834
Signed-off-by: Loic Dachary <loic@dachary.org>
to list inconsistent snapsets of a given PG, this command exposes
get_inconsistent_snapsets() rados API to user.
Fixes: #13505
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent objects of a given PG, this command exposes
get_inconsistent_objects() rados API to user.
Signed-off-by: Kefu Chai <kchai@redhat.com>
the inconsistent snapsets are identified in ReplicatedPG::_scrub()
after we compared the authorized objects with their replica/shards.
these inconsistent information are stored in the omap of objects
with prefix "SCRUB_SS_".
Signed-off-by: Kefu Chai <kchai@redhat.com>
persist inconsistent objects found when comparing the ScrubMaps
collected from replica/shards. the discrepancies between the auth
copy and the replica are identified as inconsistencies. and hence
encoded into the omap of an object of the temp coll of the PG in
question.
scrub_types.{h,cpp} are introduced to hide the details of how we
persist the scrub types from the librados client.
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent PGs of a given pool. this command exposes
the underlying get_inconsistent_pgs() API to user.
Signed-off-by: Kefu Chai <kchai@redhat.com>