This reverts commit 10b68b2e1a.
The check for 'nextkey < last_disk_key' makes not much sense since
last_disk_key is an empty string and not set before. Comparing a
decoded string to be less than an empty string will be never true.
Since this if() isn't part of a loop last_disk_key is only set
once and there is no other consumer: revert this dead code.
Conflicts:
src/osd/ReplicatedPG.cc
Fix potential deref after null check. Move check for max_snaps in
rbd_snap_list up to fail early before call any functions.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
[src/osd/ReplicatedPG.cc:2171]: (style) Redundant checking of STL
container element existence before removing it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
In the checks to build only_in_b up the wrong const_iterator x is
build up. it should compare rhs->xattrs with xattrs entries and
not twice rhs->xattrs.
Fix for:
CID 716957 (#1 of 1): Invalid iterator comparison (MISMATCHED_ITERATOR)
mismatched_comparison: Comparing x from rhs->xattrs to this->xattrs.end()
from this->xattrs.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for:
CID 717177 (#2-1 of 3): Uncaught exception (UNCAUGHT_EXCEPT)
root_function: In function main(int, char const **) an exception of
type ceph::FailedAssertion is thrown and never caught.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Readahead was using the incorrect lock with the pending condition,
resulting in a failed assertion. It now uses the lock associated
with pending ops.
Fixes: #10045
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
adjust_item_weight method will adjust all buckets which the item
inside. If the osd.0 in host=fake01 and host=fake02, we execute
"ceph osd crush osd.0 10 host=fake01", it not only will adjust fake01's
weight, but also will adjust fake02's weight.
the patch add adjust_item_weightf_in_loc method and fix remove_item,
_remove_item_under, update_item, insert_item, detach_bucket methods.
Signed-off-by: Rongze Zhu <zrzhit@gmail.com>
Add the --erasure-generation exhaustive flag to try all combinations of
erasures, not just one at random.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
This is handy when scripting in the context of teuthology and only
conditionally run tests for the isa plugin, for instance.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
The only reason for not dlclosing plugins at exit is for callgrind but
ceph_erasure_code has no workload that would require callgrind.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
The jerasure-per-chunk-alignment prameter was mispelled and while
useable that would lead to confusion.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Clone the archive of encoded objects and decode all archived objects, up
to and including the current ceph version.
http://tracker.ceph.com/issues/9420 Refs: #9420
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Introduce ceph_erasure_code_non_regression to check and compare how an
erasure code plugin encodes and decodes content with a given set of
parameters. For instance:
./ceph_erasure_code_non_regression \
--plugin jerasure \
--parameter technique=reed_sol_van \
--parameter k=2 \
--parameter m=2 \
--stripe-width 3181 \
--create \
--check
Will create an encoded object (--create) and store it into a directory
along with the chunks, one chunk per file. The directory name is derived
from the parameters. The content of the object is a random pattern of 31
bytes repeated to fill the object size specified with --stripe-width.
The check function (--check) reads the object back from the file,
encodes it and compares the result with the content of the chunks read
from the files. It also attempts recover from one or two erasures.
Chunks encoded by a given version of Ceph are expected to be encoded
exactly in the same way by all Ceph versions going forward.
http://tracker.ceph.com/issues/9420 Refs: #9420
Signed-off-by: Loic Dachary <loic-201408@dachary.org>