When m_readahead_pos reaches the limit, there's no need to call
_compute_readahead to calculate the readahead. Just return with no
readahead.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
triggering request is big enough
If the size of the read triggering the continuing readahead is such big
that exceeding m_readahead_pos, should do the readahead starting from
m_last_pos.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
This can be done better in a separate script, which puts these in
CEPH_EXTRA_CONFIGURE_ARGS. In particular, this lets us enable
lttng for gitbuilder builds, but not release builds.
Fixes: #11333
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit a294daff0b)
This can be done better in a separate script, which puts these in
CEPH_EXTRA_CONFIGURE_ARGS. In particular, this lets us enable
lttng for gitbuilder builds, but not release builds.
Fixes: #11333
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Instead of flagging the HEAD image object map as invalid when an
error occurs with a snapshot object map, properly flag the snapshot
as invalid.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Images no longer track per-snapshot features. snapshot_list
no longer needs to retrieve per-snapshot features.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
In preparation for dynamic feature bits, it probably doesn't
make sense to have snapshots have different features enabled.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Add a test for the activation of the memstore objectstore and verify
that it works without specifying a journal.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Add the test_pool_read_write function to share the rados put / get test
that demonstrate the osd that has been created can actually be used. Use
it from the both the regular device and dmcrypt tests.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Instead of duplicating the device construction / destruction logic for
dmcrypt tests, use test_setup_dev_and_run to do it. It is now able to
recover from devmapper leftover which may occur when a cryptsetup test
fails.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The activate_dmcrypt_plain_dev_body and activate_dmcrypt_dev_body
functions are almost identical, merge them and differentiate with an
argument.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Move test_activate_dev to test_setup_dev_and_run and make it
run the function given in argument. test_activate_dev calls
test_setup_dev_and_run and no longer needs to implement device
allocation or destruction.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Address all possible failure cases, when ceph-disk.sh completes or when
it starts with leftover from a previous interrupted run. It is assumed
that ceph-disk.sh will crash at any point.
* umount all mount points that belong to ceph-disk.sh (check the
absolute path of the directory)
* dmsetup remove all device mapper nodes found to hold a loop device
that ceph-disks.sh no longer uses
* losetup --detach all loop devices that ceph-disks.sh no longer uses
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The tests explicitly return on error when relevant. Add two error cases:
* detect when the allocation of a loop device fails.
* in the outer loop, return immediately if one of the test fails
Signed-off-by: Loic Dachary <ldachary@redhat.com>
On RHEL 6 and CentOS 6 sphinx 1.0+ which is required to build man pages
is packaged as sphinx10 instead of sphinx and the binary is
sphinx-1.0-build instead of sphinx-build.
Signed-off-by: Loic Dachary <ldachary@redhat.com>