If the remap vector is not empty, use it to figure out the sequence of
data chunks.
http://tracker.ceph.com/issues/9025Fixes: #9025
Signed-off-by: Loic Dachary <loic@dachary.org>
Each D letter is a data chunk. For instance:
_DDD_DDD
is going to parse into:
[ 1, 2, 3, 5, 6, 7 ]
the 0 and 4 positions are not used by chunks and do not show in the
mapping. Implement ErasureCode::parse to support a reasonable default
for the mapping parameter.
Signed-off-by: Loic Dachary <loic@dachary.org>
Add support for erasure code plugins that do not sequentially map the
chunks encoded to the corresponding index. This is mostly transparent to
the caller, except when it comes to retrieving the data chunks when
reading. For this purpose there needs to be a remapping function so the
caller has a way to figure out which chunks actually contain the data
and reorder them.
Signed-off-by: Loic Dachary <loic@dachary.org>
Description: Currently setmaxosd command allows removal of OSDs by providing
a number less than current max OSD number. This causes abrupt removal of
OSDs causing data loss as well as kernel panic when kernel RBDs are involved.
Fix is to avoid removal of OSDs if any of the OSDs in the range between
current max OSD number and new max OSD number is part of the cluster.
Fixes: #8865
Signed-off-by: Anand Bhat <anand.bhat@sandisk.com>
The monitor does a create_anon_connection() to create a pseudo Connection
object for forwarded messages. If we try to call mark_down or similar
on one of these we should silently ignore the operation, not crash.
If we try to send a message, still crash (explicitly assert); the caller
should probably know better.
Fixes: #9062
Signed-off-by: Sage Weil <sage@redhat.com>
Back in 8f7900a09c we added the new fields
before the 'extended' section, which made the encoding incompatible.
Instead, add them at the end--old clients don't care whether the enabled
flag is set or what the 'fs name' is.
Fixes: #8725
Signed-off-by: Sage Weil <sage@redhat.com>
This keeps the old-version special cases in one place and make it obvious
what the current/forward-looking path is.
Signed-off-by: Sage Weil <sage@redhat.com>
After a split we can get negative values here. Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.
Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
The mark-down of old peers needs to take the session_dispatch_lock in order
to safely clear the Session ref cycle. However, for fast dispatch callers,
that lock is already held. Pass a flag down from the callers indicating
whether we need to take the additional lock.
Fixes: #9096
Signed-off-by: Sage Weil <sage@redhat.com>
We do not know when the objecter will finally let go of this Context. Thus, we
cannot know whether it will happen before the flush, at which point the
object_context held by the cop must have been released.
Also, we simply don't need it, process_copy_chunk alrady works in terms of the
tid!
Fixes: #8894
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>