Added a unique client id to announcement messages so that duplicate
lock release / acquired / requested messages can be detected and
ignored by the client. Also fixed an issue processing the result
code for async operations.
Fixes: #10898
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Moved all RPC messages to their own classes to facilitate cleaner
version control and backward compatibility.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Utilize the existing rbd_default_features config option to
control whether or not to enable RBD exclusive locking and
object map features by default. Also added a new option to
the rbd cli to specify the image features when creating images.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Otherwise, we can race with another thread updating state.seq
resulting in the old, smaller value getting persisted. If there
is a crash at that time, we will reuse a sequence number, resulting
in an inconsistent node tree and bug #9891.
Fixes: 9891
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
osd: number of degraded objects in EC pool is wrong when there is OSD down(in).
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
If setting CEPH_BUILD_ROOT, will use that path, otherwise runs
everything from current directory as before.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
The bit vector was not invalidating the bufferlist's CRC, resulting
in peer OSDs rejecting write op due to a mismatched CRC on the
message.
Fixes: #10919
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Correct and restore assert that was removed
Cause by f46b1b473fFixes: #10883
Backport: dumpling, firefly, giant
Signed-off-by: David Zafman <dzafman@redhat.com>
librbd was previously attempting to cast the provided Context to
retrieve the fadvise flags. To eliminate the unsafe cast, now
the fadvise flags are directly passed to the WritebackHandler::read
callback.
Fixes: #10914
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
It is useful to know how big the pg_temp map is. Strictly speaking
this is part of the OSDMap so I'm including it here. It looks like
this:
osdmap e25: 3 osds: 3 up, 3 in; 1 remapped pgs
It might be more user-friendly to put it in a line with the pgmap
somewhere (where other pg counts are included), but it doesn't quite
fit there either. So sticking with where it lives in the data
structure!
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit db06582a06)
Previously, there was a harmless bug where we didn't fill in the
last_epoch_started field for a peer which we are resetting the
last_backfill line for. It's no longer harmless since we use that
as the activation epoch, so if the peer is missing the MIN_SIZE
feature bit, we fill in the last_epoch_started it meant to fill in.
Signed-off-by: Samuel Just <sjust@redhat.com>
It was possible for ImageWatcher to attempt to re-acquire held locks
via context callbacks. This issue affected resizing/flattening when
no work was required and rescheduling a watch upon two successive
failures.
Fixes: #10899
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
RBD object map requires exclusive lock support, which is not
yet available in the kernel client.
Fixes: #10900
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ceph-devel contains various header files/bindings for several
libraries, this patch creates *-devel packages for all the libraries
separately and provides the compatibility layer for the split.
http://tracker.ceph.com/issues/10884 Refs: #10884
Signed-off-by: Boris Ranto <branto@redhat.com>
Amended by Ken Dreyer <kdreyer@redhat.com> to add version numbers to the
Obsoletes, add Obsoletes to the libradosstriper1-devel and
libcephfs_jni1-devel subpackages, adjust the librados documentation, and
add the Redmine issue number to this commit log.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
The md_lock is now held for reading when scheduling write/discards.
Since snap_create now holds the lock for writing and flushes all
pending IO, write/discard operations will now be consistent for a
given request across objects.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Instead of relying on the built-in object snapshot support,
create a separate object map object for each image snapshot.
This will allow a future repair utility to rebuild the object
map for an image's snapshots.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Mapped IoCtx::write_full to existing test method used by the
ObjectWriteOperation::write_full API method. Also added missing
cls_log implementation for debugging.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the object map is already flagged as invalid, avoid
attempting to set the invalid object map flag again.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Added a footer to the object map which stores a header CRC and
and data CRCs for each 4KB chunk. Updates to the object map only
require recomputing the CRC to the affected 4KB chunk.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>