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>
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>
init2_1, init2_2, init2_3 are equivalent to init_1 and also removed.
encode_6, decode_6, create_ruleset_3 are null argument tests,
but the arguments are references of C++, so also removed.
Signed-off-by: Takeshi Miyamae <miyamae.takeshi@jp.fujitsu.com>
Reject the creation of an erasure code profile including plugin=shec
unless --enable-experimental-unrecoverable-data-corrupting-features=shec
is set.
http://tracker.ceph.com/issues/10800Fixes: #10800
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Implement check_experimental_feature_enabled so that it returns the
message instead of unconditionally displaying it via derr. It allows the
caller to display it in another context.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
We don't want/need to carry this state between scrub stages, so lets
remove the tempation by simply making it a local to scrub_compare_maps.
This caused a bug where we would attempt to write out the
missing_digests from the previous chunk during all future chunks, which
caused trouble.
Fixes: 10840
Signed-off-by: Samuel Just <sjust@redhat.com>
entity_name_t is tightly coupled to the messenger, while EntityName is
tied to auth. When expanding profiles we want to tie the profile
expansion to the entity that was authenticated. Otherwise we may incur
in weird behavior such as having caps validation failing because a given
client messenger inst does not match the auth entity it used.
e.g., running
ceph --name osd.0 config-key exists foo daemon-private/osd.X/foo
has entity_name_t 'client.12345' and EntityName 'osd.0'. Using
entity_name_t during profile expansion would not allow the client access
to daemon-private/osd.X/foo (client.12345 != osd.X).
Fixes: #10844
Backport: firefly,giant
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
There is no ENCODE_START/FINISH block when encoding inode that
embedded in dentry. So we can't use encoding version to check
if the buffer contains InodeStore::oldest_snap. Instead, we check
if the buffer iterator reaches end of buffer.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Avoid using COPY with multiple files because it will not behave as
intended with older (1.2) versions of docker.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The tags for the centos repository changed from centos6, centos7 to 6
and 7 which is consistent with the other distribution
repositories. Update the documentation accordingly.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
There cannot be a common Dockerfile for all repository:tag combination
of a given operating system. The only way to customize a Dockerfile is
via variable substitution and it cannot conveniently address all
differences between versions.
Create one Dockerfile per operating system version instead. I.e. one
dockerfile for centos:7, one for centos:6 etc.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
* on boost 1.41, the ascii::space skipper fails to skip the spaces at the
beginning of the parsed string, so as a workaround we replace the `lit(' ')`
in grammar spec with `ascii::blank`. this also simplifies the grammar
a little bit.
Fixes: #10757
Signed-off-by: Kefu Chai <kchai@redhat.com>