linger_op->notify_result_bl = &reply_bl;
}
- virtual void finish(int r)
+ void finish(int r) override
{
ldout(cct, 10) << __func__ << " completed notify (linger op "
<< linger_op << "), r = " << r << dendl;
{
}
- virtual void finish(int r)
+ void finish(int r) override
{
objecter->linger_cancel(linger_op);
}
c->get();
}
- virtual void finish(int r) {
+ void finish(int r) override {
if (cancel || r < 0)
c->io->client->finisher.queue(new C_aio_linger_cancel(c->io->objecter,
linger_op));
complete_unlock(r);
}
- virtual void complete(int r) override {
+ void complete(int r) override {
// invoked by C_notify_Finish (or C_aio_notify_Ack on failure)
lock.Lock();
finished = true;
{
}
- virtual void finish(int r)
+ void finish(int r) override
{
ldout(cct, 10) << __func__ << " linger op " << oncomplete->linger_op << " "
<< "acked (" << r << ")" << dendl;
c->get();
}
- virtual void finish(int r) {
+ void finish(int r) override {
c->lock.Lock();
c->rval = r;
c->complete = true;
dest_snapid(dest_snapid) {
}
- virtual void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
*dest_snapid = snapid;
}
public:
::ObjectOperation m_ops;
explicit C_ObjectOperation(Context *c) : m_ctx(c) {}
- virtual void finish(int r) {
+ void finish(int r) override {
m_ctx->complete(r);
}
private:
void handle_notify(uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
- bufferlist& bl) {
+ bufferlist& bl) override {
ldout(ioctx->client->cct, 10) << __func__ << " " << notify_id
<< " cookie " << cookie
<< " notifier_id " << notifier_id
ioctx->notify_ack(oid, notify_id, cookie, empty);
}
}
- void handle_error(uint64_t cookie, int err) {
+ void handle_error(uint64_t cookie, int err) override {
ldout(ioctx->client->cct, 10) << __func__ << " cookie " << cookie
<< " err " << err
<< dendl;
c->get();
}
- virtual void finish(int r) {
+ void finish(int r) override {
c->lock.Lock();
c->rval = r;
c->complete = true;
bufferlist bl;
public:
explicit ObjectOpCompletionCtx(librados::ObjectOperationCompletion *c) : completion(c) {}
- void finish(int r) {
+ void finish(int r) override {
completion->handle_completion(r, bl);
delete completion;
}
AioUnlockCompletion(librados::AioCompletion *c) : completion(c->pc) {
completion->get();
};
- void handle_completion(int r, bufferlist& outbl) {
+ void handle_completion(int r, bufferlist& outbl) override {
rados_callback_t cb = completion->callback_complete;
void *cb_arg = completion->callback_complete_arg;
cb(completion, cb_arg);
rados_watchcb_t wcb;
void *arg;
C_WatchCB(rados_watchcb_t _wcb, void *_arg) : wcb(_wcb), arg(_arg) {}
- void notify(uint8_t opcode, uint64_t ver, bufferlist& bl) {
+ void notify(uint8_t opcode, uint64_t ver, bufferlist& bl) override {
wcb(opcode, ver, arg);
}
};
void handle_notify(uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_gid,
- bufferlist& bl) {
+ bufferlist& bl) override {
wcb(arg, notify_id, cookie, notifier_gid, bl.c_str(), bl.length());
}
- void handle_error(uint64_t cookie, int err) {
+ void handle_error(uint64_t cookie, int err) override {
if (errcb)
errcb(arg, cookie, err);
}
size_t *bytes_read,
int *prval) : out_buf(out_buf), out_len(out_len),
bytes_read(bytes_read), prval(prval) {}
- void finish(int r) {
+ void finish(int r) override {
if (out_bl.length() > out_len) {
if (prval)
*prval = -ERANGE;
bufferlist out_bl;
C_out_buffer(char **out_buf, size_t *out_len) : out_buf(out_buf),
out_len(out_len) {}
- void finish(int r) {
+ void finish(int r) override {
// ignore r since we don't know the meaning of return values
// from custom class methods
do_out_buffer(out_bl, out_buf, out_len);
RadosOmapIter *iter;
public:
explicit C_OmapIter(RadosOmapIter *iter) : iter(iter) {}
- void finish(int r) {
+ void finish(int r) override {
iter->i = iter->values.begin();
}
};
librados::RadosXattrsIter *iter;
public:
explicit C_XattrsIter(librados::RadosXattrsIter *iter) : iter(iter) {}
- void finish(int r) {
+ void finish(int r) override {
iter->i = iter->attrset.begin();
}
};
RadosOmapIter *iter;
std::set<std::string> keys;
explicit C_OmapKeysIter(RadosOmapIter *iter) : iter(iter) {}
- void finish(int r) {
+ void finish(int r) override {
// map each key to an empty bl
for (std::set<std::string>::const_iterator i = keys.begin();
i != keys.end(); ++i) {
{
public:
LibRadosTwoPoolsECPP() {};
- virtual ~LibRadosTwoPoolsECPP() {};
+ ~LibRadosTwoPoolsECPP() {};
protected:
static void SetUpTestCase() {
pool_name = get_temp_pool_name();
}
static std::string src_pool_name;
- virtual void SetUp() {
+ void SetUp() override {
RadosTestECPP::SetUp();
ASSERT_EQ(0, cluster.ioctx_create(src_pool_name.c_str(), src_ioctx));
src_ioctx.set_namespace(nspace);
}
- virtual void TearDown() {
+ void TearDown() override {
// wait for maps to settle before next test
cluster.wait_for_latest_osdmap();
{
public:
LibRadosTwoPoolsPP() {};
- virtual ~LibRadosTwoPoolsPP() {};
+ ~LibRadosTwoPoolsPP() {};
protected:
static void SetUpTestCase() {
pool_name = get_temp_pool_name();
}
static std::string cache_pool_name;
- virtual void SetUp() {
+ void SetUp() override {
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
RadosTestPP::SetUp();
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
cache_ioctx.set_namespace(nspace);
}
- virtual void TearDown() {
+ void TearDown() override {
// flush + evict cache
flush_evict_all(cluster, cache_ioctx);
{
public:
LibRadosTwoPoolsECPP() {};
- virtual ~LibRadosTwoPoolsECPP() {};
+ ~LibRadosTwoPoolsECPP() {};
protected:
static void SetUpTestCase() {
pool_name = get_temp_pool_name();
}
static std::string cache_pool_name;
- virtual void SetUp() {
+ void SetUp() override {
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
RadosTestECPP::SetUp();
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
cache_ioctx.set_namespace(nspace);
}
- virtual void TearDown() {
+ void TearDown() override {
// flush + evict cache
flush_evict_all(cluster, cache_ioctx);
class WatchNotifyTestCtx : public WatchCtx
{
public:
- void notify(uint8_t opcode, uint64_t ver, bufferlist& bl)
+ void notify(uint8_t opcode, uint64_t ver, bufferlist& bl) override
{
std::cout << __func__ << std::endl;
sem_post(sem);
{}
void handle_notify(uint64_t notify_id, uint64_t cookie, uint64_t notifier_gid,
- bufferlist& bl) {
+ bufferlist& bl) override {
std::cout << __func__ << " cookie " << cookie << " notify_id " << notify_id
<< " notifier_gid " << notifier_gid << std::endl;
notify->notify_bl = bl;
notify_ioctx->notify_ack(notify->notify_oid, notify_id, cookie, reply);
}
- void handle_error(uint64_t cookie, int err) {
+ void handle_error(uint64_t cookie, int err) override {
std::cout << __func__ << " cookie " << cookie
<< " err " << err << std::endl;
assert(cookie > 1000);
}
}
- virtual void finish(int r) {
+ void finish(int r) override {
int ret = m_callback();
if (m_comp != NULL) {
if (m_finisher != NULL) {