Before setting size equal to op.extent.truncate_size, we need to check
if the size of the object is greater than the truncate_size. We do not
need to set size to op.extent.truncate_size, in the case where the size of
the object is less than op.extent.truncate_size.
Without this change, we were always setting size =
op.extent.truncate_size, when (seq < op.extent.truncate_seq) and
(op.extent.offset + op.extent.length > op.extent.truncate_size), were both
true. This ended up in:
1. overestimating the size of the object
2. not considering the correct size of the object, for
the later checks, which calculate op.extent.length for the read ops
3. causing crashes when trying to read more data than what was present
Fixes: http://tracker.ceph.com/issues/21931
Fixes: http://tracker.ceph.com/issues/22330
Signed-off-by: Neha Ojha <nojha@redhat.com>
* refs/pull/24305/head:
msg/async: ProtocolV1: use continuations instead of direct function calls
msg/async: ProtocolV1 state machine ascii diagram
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
* refs/pull/23069/head:
tests/libcephfs: add simple reclaim test
mds: check auth name before reclaiming session
mds: reclaim session before allowing mds to become active
mds: allow client to specify its session timeout
mds: initial code for client states reclaim
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Even if all devices are filtered we want to return a 0 exit code and
make sure the json reporting still works.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
If after filterering of data/block devices there are only
one device left it can not be used if it is an SSD and
has been used previously as a journal or block.db
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
The mixed type tests will change strategy after the idempotency test so
we need to handle that in test playbook.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
If we fail to load a ceph configureation file when trying to get the
block.db size then just use defaults instead of throwing an error.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This will pick a strategy, filter out any devices already been used by
ceph and then pick a strategy again. If the strategy has changed the
call should error, if the strategy is the same proceed. If there are no
unused devices then the command is a noop.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This will indicate if the command would result in any OSDs being created
or not. Other tooling can use that key for idempotency checks.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
cmake: do not use plain target_link_libraries(rgw_a ...)
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Kai Wagner <kwagner@suse.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
this addresses following error:
CMake Error at src/rgw/CMakeLists.txt:178 (target_link_libraries):
The plain signature for target_link_libraries has already been used
with
the target "rgw_a". All uses of target_link_libraries with a target
must
be either all-keyword or all-plain.
The uses of the plain signature are here:
* src/rgw/CMakeLists.txt:168 (target_link_libraries)
Signed-off-by: Kefu Chai <kchai@redhat.com>