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>
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>