FuseStore *fs;
public:
explicit FuseThread(FuseStore *f) : fs(f) {}
- void *entry() {
+ void *entry() override {
fs->loop();
return NULL;
}
) = 0; ///< @return true if idle, false otherwise
Sequencer_impl(CephContext* cct) : RefCountedObject(NULL, 0), cct(cct) {}
- virtual ~Sequencer_impl() {}
+ ~Sequencer_impl() override {}
};
typedef boost::intrusive_ptr<Sequencer_impl> Sequencer_implRef;
static int64_t total_blocks;
static void incr_count() { count++;}
static int64_t get_total_blocks() {return total_blocks;}
- bool is_allocated(int64_t start_block, int64_t num_blocks);
- bool is_exhausted();
+ bool is_allocated(int64_t start_block, int64_t num_blocks) override;
+ bool is_exhausted() override;
void reset_marker();
- int64_t sub_used_blocks(int64_t num_blocks);
- int64_t add_used_blocks(int64_t num_blocks);
- bool reserve_blocks(int64_t num_blocks);
- void unreserve(int64_t num_blocks, int64_t allocated);
- int64_t get_reserved_blocks();
- int64_t get_used_blocks();
- int64_t size() {
+ int64_t sub_used_blocks(int64_t num_blocks) override;
+ int64_t add_used_blocks(int64_t num_blocks) override;
+ bool reserve_blocks(int64_t num_blocks) override;
+ void unreserve(int64_t num_blocks, int64_t allocated) override;
+ int64_t get_reserved_blocks() override;
+ int64_t get_used_blocks() override;
+ int64_t size() override {
return get_total_blocks();
}
- void lock_excl();
- bool lock_excl_try();
- void unlock();
+ void lock_excl() override;
+ bool lock_excl_try() override;
+ void unlock() override;
bool check_locked();
void free_blocks_int(int64_t start_block, int64_t num_blocks);
BitMapZone(CephContext* cct, int64_t total_blocks, int64_t zone_num);
BitMapZone(CephContext* cct, int64_t total_blocks, int64_t zone_num, bool def);
- ~BitMapZone();
- void shutdown();
+ ~BitMapZone() override;
+ void shutdown() override;
int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
- int64_t blk_off, ExtentList *block_list);
- void set_blocks_used(int64_t start_block, int64_t num_blocks);
+ int64_t blk_off, ExtentList *block_list) override;
+ void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
- void free_blocks(int64_t start_block, int64_t num_blocks);
- void dump_state(int& count);
+ void free_blocks(int64_t start_block, int64_t num_blocks) override;
+ void dump_state(int& count) override;
};
class BitMapAreaIN: public BitMapArea{
std::mutex m_blocks_lock;
BitMapAreaList *m_child_list;
- virtual bool is_allocated(int64_t start_block, int64_t num_blocks);
- virtual bool is_exhausted();
+ bool is_allocated(int64_t start_block, int64_t num_blocks) override;
+ bool is_exhausted() override;
- bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) {
+ bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) override {
ceph_abort();
return false;
}
- virtual bool child_check_n_lock(BitMapArea *child, int64_t required);
- virtual void child_unlock(BitMapArea *child);
+ bool child_check_n_lock(BitMapArea *child, int64_t required) override;
+ void child_unlock(BitMapArea *child) override;
- virtual void lock_excl() {
+ void lock_excl() override {
return;
}
- virtual void lock_shared() {
+ void lock_shared() override {
return;
}
- virtual void unlock() {
+ void unlock() override {
return;
}
BitMapAreaIN(CephContext* cct, int64_t zone_num, int64_t total_blocks,
bool def);
- virtual ~BitMapAreaIN();
- void shutdown();
- virtual int64_t sub_used_blocks(int64_t num_blocks);
- virtual int64_t add_used_blocks(int64_t num_blocks);
- virtual bool reserve_blocks(int64_t num_blocks);
- virtual void unreserve(int64_t num_blocks, int64_t allocated);
- virtual int64_t get_reserved_blocks();
- virtual int64_t get_used_blocks();
+ ~BitMapAreaIN() override;
+ void shutdown() override;
+ int64_t sub_used_blocks(int64_t num_blocks) override;
+ int64_t add_used_blocks(int64_t num_blocks) override;
+ bool reserve_blocks(int64_t num_blocks) override;
+ void unreserve(int64_t num_blocks, int64_t allocated) override;
+ int64_t get_reserved_blocks() override;
+ int64_t get_used_blocks() override;
virtual int64_t get_used_blocks_adj();
- virtual int64_t size() {
+ int64_t size() override {
return m_total_blocks;
}
using BitMapArea::alloc_blocks_dis; //non-wait version
virtual int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
- int64_t blk_off, ExtentList *block_list);
- virtual int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
- int64_t blk_off, ExtentList *block_list);
+ int64_t blk_off, ExtentList *block_list);
+ int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
+ int64_t blk_off, ExtentList *block_list) override;
virtual void set_blocks_used_int(int64_t start_block, int64_t num_blocks);
- virtual void set_blocks_used(int64_t start_block, int64_t num_blocks);
+ void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
virtual void free_blocks_int(int64_t start_block, int64_t num_blocks);
- virtual void free_blocks(int64_t start_block, int64_t num_blocks);
- void dump_state(int& count);
+ void free_blocks(int64_t start_block, int64_t num_blocks) override;
+ void dump_state(int& count) override;
};
class BitMapAreaLeaf: public BitMapAreaIN{
bool def);
using BitMapAreaIN::child_check_n_lock;
- bool child_check_n_lock(BitMapArea *child, int64_t required) {
+ bool child_check_n_lock(BitMapArea *child, int64_t required) override {
ceph_abort();
return false;
}
int64_t alloc_blocks_int(int64_t num_blocks, int64_t hint, int64_t *start_block);
int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
- int64_t blk_off, ExtentList *block_list);
- void free_blocks_int(int64_t start_block, int64_t num_blocks);
+ int64_t blk_off, ExtentList *block_list) override;
+ void free_blocks_int(int64_t start_block, int64_t num_blocks) override;
- virtual ~BitMapAreaLeaf();
+ ~BitMapAreaLeaf() override;
};
}
using BitMapArea::child_check_n_lock;
- bool child_check_n_lock(BitMapArea *child, int64_t required);
- virtual void child_unlock(BitMapArea *child);
+ bool child_check_n_lock(BitMapArea *child, int64_t required) override;
+ void child_unlock(BitMapArea *child) override;
void serial_lock();
bool try_serial_lock();
void serial_unlock();
- void lock_excl();
- void lock_shared();
+ void lock_excl() override;
+ void lock_shared() override;
bool try_lock();
- void unlock();
+ void unlock() override;
bool check_input(int64_t num_blocks);
bool check_input_dis(int64_t num_blocks);
int64_t alloc_blocks_dis_work(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list, bool reserved);
int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc,
- int64_t hint, int64_t area_blk_off, ExtentList *block_list);
+ int64_t hint, int64_t area_blk_off, ExtentList *block_list) override;
public:
MEMPOOL_CLASS_HELPERS();
bmap_alloc_mode_t mode, bool def);
BitAllocator(CephContext* cct, int64_t total_blocks, int64_t zone_size_block,
bmap_alloc_mode_t mode, bool def, bool stats_on);
- ~BitAllocator();
- void shutdown();
+ ~BitAllocator() override;
+ void shutdown() override;
using BitMapAreaIN::alloc_blocks_dis; //Wait version
- void free_blocks(int64_t start_block, int64_t num_blocks);
- void set_blocks_used(int64_t start_block, int64_t num_blocks);
+ void free_blocks(int64_t start_block, int64_t num_blocks) override;
+ void set_blocks_used(int64_t start_block, int64_t num_blocks) override;
void unreserve_blocks(int64_t blocks);
int64_t alloc_blocks_dis_res(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list);
int64_t total_blocks() const {
return m_total_blocks - m_extra_blocks;
}
- int64_t get_used_blocks() {
+ int64_t get_used_blocks() override {
return (BitMapAreaIN::get_used_blocks_adj() - m_extra_blocks);
}
public:
BitMapAllocator(CephContext* cct, int64_t device_size, int64_t block_size);
- ~BitMapAllocator();
+ ~BitMapAllocator() override;
int reserve(uint64_t need) override;
void unreserve(uint64_t unused) override;
num_writers(0),
num_reading(0)
{}
- ~File() {
+ ~File() override {
assert(num_readers.load() == 0);
assert(num_writers.load() == 0);
assert(num_reading.load() == 0);
BlueFS::FileReader *h;
public:
BlueRocksSequentialFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
- ~BlueRocksSequentialFile() {
+ ~BlueRocksSequentialFile() override {
delete h;
}
BlueFS::FileReader *h;
public:
BlueRocksRandomAccessFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
- ~BlueRocksRandomAccessFile() {
+ ~BlueRocksRandomAccessFile() override {
delete h;
}
BlueFS::FileWriter *h;
public:
BlueRocksWritableFile(BlueFS *fs, BlueFS::FileWriter *h) : fs(fs), h(h) {}
- ~BlueRocksWritableFile() {
+ ~BlueRocksWritableFile() override {
fs->close_writer(h);
}
BlueFS *fs;
BlueFS::FileLock *lock;
BlueRocksFileLock(BlueFS *fs, BlueFS::FileLock *l) : fs(fs), lock(l) { }
- ~BlueRocksFileLock() {
+ ~BlueRocksFileLock() override {
}
};
rocksdb::Status NewSequentialFile(
const std::string& fname,
std::unique_ptr<rocksdb::SequentialFile>* result,
- const rocksdb::EnvOptions& options);
+ const rocksdb::EnvOptions& options) override;
// Create a brand new random access read-only file with the
// specified name. On success, stores a pointer to the new file in
rocksdb::Status NewRandomAccessFile(
const std::string& fname,
std::unique_ptr<rocksdb::RandomAccessFile>* result,
- const rocksdb::EnvOptions& options);
+ const rocksdb::EnvOptions& options) override;
// Create an object that writes to a new file with the specified
// name. Deletes any existing file with the same name and creates a
rocksdb::Status NewWritableFile(
const std::string& fname,
std::unique_ptr<rocksdb::WritableFile>* result,
- const rocksdb::EnvOptions& options);
+ const rocksdb::EnvOptions& options) override;
// Reuse an existing file by renaming it and opening it as writable.
rocksdb::Status ReuseWritableFile(
const std::string& fname,
const std::string& old_fname,
std::unique_ptr<rocksdb::WritableFile>* result,
- const rocksdb::EnvOptions& options);
+ const rocksdb::EnvOptions& options) override;
// Create an object that represents a directory. Will fail if directory
// doesn't exist. If the directory exists, it will open the directory
// returns non-OK.
rocksdb::Status NewDirectory(
const std::string& name,
- std::unique_ptr<rocksdb::Directory>* result);
+ std::unique_ptr<rocksdb::Directory>* result) override;
// Returns OK if the named file exists.
// NotFound if the named file does not exist,
// the calling process does not have permission to determine
// whether this file exists, or if the path is invalid.
// IOError if an IO Error was encountered
- rocksdb::Status FileExists(const std::string& fname);
+ rocksdb::Status FileExists(const std::string& fname) override;
// Store in *result the names of the children of the specified directory.
// The names are relative to "dir".
// Original contents of *results are dropped.
rocksdb::Status GetChildren(const std::string& dir,
- std::vector<std::string>* result);
+ std::vector<std::string>* result) override;
// Delete the named file.
- rocksdb::Status DeleteFile(const std::string& fname);
+ rocksdb::Status DeleteFile(const std::string& fname) override;
// Create the specified directory. Returns error if directory exists.
- rocksdb::Status CreateDir(const std::string& dirname);
+ rocksdb::Status CreateDir(const std::string& dirname) override;
// Create directory if missing. Return Ok if it exists, or successful in
// Creating.
- rocksdb::Status CreateDirIfMissing(const std::string& dirname);
+ rocksdb::Status CreateDirIfMissing(const std::string& dirname) override;
// Delete the specified directory.
- rocksdb::Status DeleteDir(const std::string& dirname);
+ rocksdb::Status DeleteDir(const std::string& dirname) override;
// Store the size of fname in *file_size.
- rocksdb::Status GetFileSize(const std::string& fname, uint64_t* file_size);
+ rocksdb::Status GetFileSize(const std::string& fname, uint64_t* file_size) override;
// Store the last modification time of fname in *file_mtime.
rocksdb::Status GetFileModificationTime(const std::string& fname,
- uint64_t* file_mtime);
+ uint64_t* file_mtime) override;
// Rename file src to target.
rocksdb::Status RenameFile(const std::string& src,
- const std::string& target);
+ const std::string& target) override;
// Hard Link file src to target.
- rocksdb::Status LinkFile(const std::string& src, const std::string& target);
+ rocksdb::Status LinkFile(const std::string& src, const std::string& target) override;
// Lock the specified file. Used to prevent concurrent access to
// the same db by multiple processes. On failure, stores nullptr in
// to go away.
//
// May create the named file if it does not already exist.
- rocksdb::Status LockFile(const std::string& fname, rocksdb::FileLock** lock);
+ rocksdb::Status LockFile(const std::string& fname, rocksdb::FileLock** lock) override;
// Release the lock acquired by a previous successful call to LockFile.
// REQUIRES: lock was returned by a successful LockFile() call
// REQUIRES: lock has not already been unlocked.
- rocksdb::Status UnlockFile(rocksdb::FileLock* lock);
+ rocksdb::Status UnlockFile(rocksdb::FileLock* lock) override;
// *path is set to a temporary directory that can be used for testing. It may
// or may not have just been created. The directory may or may not differ
// between runs of the same process, but subsequent calls will return the
// same directory.
- rocksdb::Status GetTestDirectory(std::string* path);
+ rocksdb::Status GetTestDirectory(std::string* path) override;
// Create and return a log file for storing informational messages.
rocksdb::Status NewLogger(
const std::string& fname,
- std::shared_ptr<rocksdb::Logger>* result);
+ std::shared_ptr<rocksdb::Logger>* result) override;
// Get full directory name for this db.
rocksdb::Status GetAbsolutePath(const std::string& db_path,
- std::string* output_path);
+ std::string* output_path) override;
explicit BlueRocksEnv(BlueFS *f);
private:
// types
public:
// config observer
- virtual const char** get_tracked_conf_keys() const override;
- virtual void handle_conf_change(const struct md_config_t *conf,
+ const char** get_tracked_conf_keys() const override;
+ void handle_conf_change(const struct md_config_t *conf,
const std::set<std::string> &changed) override;
void _set_csum();
string head, tail;
public:
OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it);
- int seek_to_first();
- int upper_bound(const string &after);
- int lower_bound(const string &to);
- bool valid();
- int next(bool validate=true);
- string key();
- bufferlist value();
- int status() {
+ int seek_to_first() override;
+ int upper_bound(const string &after) override;
+ int lower_bound(const string &to) override;
+ bool valid() override;
+ int next(bool validate=true) override;
+ string key() override;
+ bufferlist value() override;
+ int status() override {
return 0;
}
};
parent(NULL), store(store) {
store->register_osr(this);
}
- ~OpSequencer() {
+ ~OpSequencer() override {
assert(q.empty());
_unregister();
}
struct KVSyncThread : public Thread {
BlueStore *store;
explicit KVSyncThread(BlueStore *s) : store(s) {}
- void *entry() {
+ void *entry() override {
store->_kv_sync_thread();
return NULL;
}
explicit MempoolThread(BlueStore *s)
: store(s),
lock("BlueStore::MempoolThread::lock") {}
- void *entry();
+ void *entry() override;
void init() {
assert(stop == false);
create("bstore_mempool");
public:
BlueStore(CephContext *cct, const string& path);
BlueStore(CephContext *cct, const string& path, uint64_t min_alloc_size); // Ctor for UT only
- ~BlueStore();
+ ~BlueStore() override;
string get_type() override {
return "bluestore";
perf_tracker.update_from_perfcounters(*logger);
return perf_tracker.get_cur_stats();
}
- const PerfCounters* get_perf_counters() const {
+ const PerfCounters* get_perf_counters() const override {
return logger;
}
struct AioCompletionThread : public Thread {
KernelDevice *bdev;
explicit AioCompletionThread(KernelDevice *b) : bdev(b) {}
- void *entry() {
+ void *entry() override {
bdev->_aio_thread();
return NULL;
}
public:
StupidAllocator(CephContext* cct);
- ~StupidAllocator();
+ ~StupidAllocator() override;
int reserve(uint64_t need) override;
void unreserve(uint64_t unused) override;
bool m_filestore_btrfs_snap;
public:
explicit BtrfsFileStoreBackend(FileStore *fs);
- ~BtrfsFileStoreBackend() {}
- const char *get_name() {
+ ~BtrfsFileStoreBackend() override {}
+ const char *get_name() override {
return "btrfs";
}
- int detect_features();
- bool can_checkpoint();
- int create_current();
- int list_checkpoints(list<string>& ls);
- int create_checkpoint(const string& name, uint64_t *cid);
- int sync_checkpoint(uint64_t cid);
- int rollback_to(const string& name);
- int destroy_checkpoint(const string& name);
- int syncfs();
- int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff);
+ int detect_features() override;
+ bool can_checkpoint() override;
+ int create_current() override;
+ int list_checkpoints(list<string>& ls) override;
+ int create_checkpoint(const string& name, uint64_t *cid) override;
+ int sync_checkpoint(uint64_t cid) override;
+ int rollback_to(const string& name) override;
+ int destroy_checkpoint(const string& name) override;
+ int syncfs() override;
+ int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) override;
};
#endif
#endif
const ghobject_t &oid,
const map<string, bufferlist> &set,
const SequencerPosition *spos=0
- );
+ ) override;
int set_header(
const ghobject_t &oid,
const bufferlist &bl,
const SequencerPosition *spos=0
- );
+ ) override;
int get_header(
const ghobject_t &oid,
bufferlist *bl
- );
+ ) override;
int clear(
const ghobject_t &oid,
const SequencerPosition *spos=0
- );
+ ) override;
int clear_keys_header(
const ghobject_t &oid,
const SequencerPosition *spos=0
- );
+ ) override;
int rm_keys(
const ghobject_t &oid,
const set<string> &to_clear,
const SequencerPosition *spos=0
- );
+ ) override;
int get(
const ghobject_t &oid,
bufferlist *header,
map<string, bufferlist> *out
- );
+ ) override;
int get_keys(
const ghobject_t &oid,
set<string> *keys
- );
+ ) override;
int get_values(
const ghobject_t &oid,
const set<string> &keys,
map<string, bufferlist> *out
- );
+ ) override;
int check_keys(
const ghobject_t &oid,
const set<string> &keys,
set<string> *out
- );
+ ) override;
int get_xattrs(
const ghobject_t &oid,
const set<string> &to_get,
map<string, bufferlist> *out
- );
+ ) override;
int get_all_xattrs(
const ghobject_t &oid,
set<string> *out
- );
+ ) override;
int set_xattrs(
const ghobject_t &oid,
const map<string, bufferlist> &to_set,
const SequencerPosition *spos=0
- );
+ ) override;
int remove_xattrs(
const ghobject_t &oid,
const set<string> &to_remove,
const SequencerPosition *spos=0
- );
+ ) override;
int clone(
const ghobject_t &oid,
const ghobject_t &target,
const SequencerPosition *spos=0
- );
+ ) override;
/// Read initial state from backing store
int init(bool upgrade = false);
int upgrade_to_v2();
/// Consistency check, debug, there must be no parallel writes
- bool check(std::ostream &out);
+ bool check(std::ostream &out) override;
/// Ensure that all previous operations are durable
- int sync(const ghobject_t *oid=0, const SequencerPosition *spos=0);
+ int sync(const ghobject_t *oid=0, const SequencerPosition *spos=0) override;
/// Util, list all objects, there must be no other concurrent access
int list_objects(vector<ghobject_t> *objs ///< [out] objects
);
- ObjectMapIterator get_iterator(const ghobject_t &oid);
+ ObjectMapIterator get_iterator(const ghobject_t &oid) override;
static const string USER_PREFIX;
static const string XATTR_PREFIX;
class EmptyIteratorImpl : public ObjectMapIteratorImpl {
public:
- int seek_to_first() { return 0; }
+ int seek_to_first() override { return 0; }
int seek_to_last() { return 0; }
- int upper_bound(const string &after) { return 0; }
- int lower_bound(const string &to) { return 0; }
- bool valid() { return false; }
- int next(bool validate=true) { ceph_abort(); return 0; }
- string key() { ceph_abort(); return ""; }
- bufferlist value() { ceph_abort(); return bufferlist(); }
- int status() { return 0; }
+ int upper_bound(const string &after) override { return 0; }
+ int lower_bound(const string &to) override { return 0; }
+ bool valid() override { return false; }
+ int next(bool validate=true) override { ceph_abort(); return 0; }
+ string key() override { ceph_abort(); return ""; }
+ bufferlist value() override { ceph_abort(); return bufferlist(); }
+ int status() override { return 0; }
};
DBObjectMapIteratorImpl(DBObjectMap *map, Header header) :
map(map), hlock(map), header(header), r(0), ready(false), invalid(true) {}
- int seek_to_first();
+ int seek_to_first() override;
int seek_to_last();
- int upper_bound(const string &after);
- int lower_bound(const string &to);
- bool valid();
- int next(bool validate=true);
- string key();
- bufferlist value();
- int status();
+ int upper_bound(const string &after) override;
+ int lower_bound(const string &to) override;
+ bool valid() override;
+ int next(bool validate=true) override;
+ string key() override;
+ bufferlist value() override;
+ int status() override;
bool on_parent() {
return cur_iter == parent_iter;
MAX((cct->_conf->filestore_fd_cache_size / registry_shards), 1));
}
}
- ~FDCache() {
+ ~FDCache() override {
cct->_conf->remove_observer(this);
delete[] registry;
}
}
/// md_config_obs_t
- const char** get_tracked_conf_keys() const {
+ const char** get_tracked_conf_keys() const override {
static const char* KEYS[] = {
"filestore_fd_cache_size",
NULL
return KEYS;
}
void handle_conf_change(const md_config_t *conf,
- const std::set<std::string> &changed) {
+ const std::set<std::string> &changed) override {
if (changed.count("filestore_fd_cache_size")) {
for (int i = 0; i < registry_shards; ++i)
registry[i].set_size(
completions.pop_front();
}
- int prepare_entry(vector<ObjectStore::Transaction>& tls, bufferlist* tbl);
+ int prepare_entry(vector<ObjectStore::Transaction>& tls, bufferlist* tbl) override;
void submit_entry(uint64_t seq, bufferlist& bl, uint32_t orig_len,
Context *oncommit,
- TrackedOpRef osd_op = TrackedOpRef());
+ TrackedOpRef osd_op = TrackedOpRef()) override;
/// End protected by finisher_lock
/*
FileJournal *journal;
public:
explicit Writer(FileJournal *fj) : journal(fj) {}
- void *entry() {
+ void *entry() override {
journal->write_thread_entry();
return 0;
}
FileJournal *journal;
public:
explicit WriteFinisher(FileJournal *fj) : journal(fj) {}
- void *entry() {
+ void *entry() override {
journal->write_finish_thread_entry();
return 0;
}
cct->_conf->add_observer(this);
}
- ~FileJournal() {
+ ~FileJournal() override {
assert(fd == -1);
delete[] zero_buf;
cct->_conf->remove_observer(this);
}
- int check();
- int create();
- int open(uint64_t fs_op_seq);
- void close();
+ int check() override;
+ int create() override;
+ int open(uint64_t fs_op_seq) override;
+ void close() override;
int peek_fsid(uuid_d& fsid);
- int dump(ostream& out);
+ int dump(ostream& out) override;
int simple_dump(ostream& out);
int _fdump(Formatter &f, bool simple);
- void flush();
+ void flush() override;
- void reserve_throttle_and_backoff(uint64_t count);
+ void reserve_throttle_and_backoff(uint64_t count) override;
- bool is_writeable() {
+ bool is_writeable() override {
return read_pos == 0;
}
- int make_writeable();
+ int make_writeable() override;
// writes
- void commit_start(uint64_t seq);
- void committed_thru(uint64_t seq);
- bool should_commit_now() {
+ void commit_start(uint64_t seq) override;
+ void committed_thru(uint64_t seq) override;
+ bool should_commit_now() override {
return full_state != FULL_NOTFULL && !write_stop;
}
bool read_entry(
bufferlist &bl,
- uint64_t &last_seq) {
+ uint64_t &last_seq) override {
return read_entry(bl, last_seq, 0);
}
void update_from_perfcounters(PerfCounters &logger);
} perf_tracker;
- objectstore_perf_stat_t get_cur_stats() {
+ objectstore_perf_stat_t get_cur_stats() override {
perf_tracker.update_from_perfcounters(*logger);
return perf_tracker.get_cur_stats();
}
- const PerfCounters* get_perf_counters() const {
+ const PerfCounters* get_perf_counters() const override {
return logger;
}
struct SyncThread : public Thread {
FileStore *fs;
explicit SyncThread(FileStore *f) : fs(f) {}
- void *entry() {
+ void *entry() override {
fs->sync_entry();
return 0;
}
return o;
}
- void flush() {
+ void flush() override {
Mutex::Locker l(qlock);
while (cct->_conf->filestore_blackhole)
cond.Wait(qlock);
}
}
- bool flush_commit(Context *c) {
+ bool flush_commit(Context *c) override {
Mutex::Locker l(qlock);
uint64_t seq = 0;
if (_get_max_uncompleted(&seq)) {
parent(0),
apply_lock("FileStore::OpSequencer::apply_lock", false, false),
id(i) {}
- ~OpSequencer() {
+ ~OpSequencer() override {
assert(q.empty());
}
OpWQ(FileStore *fs, time_t timeout, time_t suicide_timeout, ThreadPool *tp)
: ThreadPool::WorkQueue<OpSequencer>("FileStore::OpWQ", timeout, suicide_timeout, tp), store(fs) {}
- bool _enqueue(OpSequencer *osr) {
+ bool _enqueue(OpSequencer *osr) override {
store->op_queue.push_back(osr);
return true;
}
- void _dequeue(OpSequencer *o) {
+ void _dequeue(OpSequencer *o) override {
ceph_abort();
}
- bool _empty() {
+ bool _empty() override {
return store->op_queue.empty();
}
- OpSequencer *_dequeue() {
+ OpSequencer *_dequeue() override {
if (store->op_queue.empty())
return NULL;
OpSequencer *osr = store->op_queue.front();
void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) override {
store->_do_op(osr, handle);
}
- void _process_finish(OpSequencer *osr) {
+ void _process_finish(OpSequencer *osr) override {
store->_finish_op(osr);
}
- void _clear() {
+ void _clear() override {
assert(store->op_queue.empty());
}
} op_wq;
FileStore(CephContext* cct, const std::string &base, const std::string &jdev,
osflagbits_t flags = 0,
const char *internal_name = "filestore", bool update_to=false);
- ~FileStore();
+ ~FileStore() override;
- string get_type() {
+ string get_type() override {
return "filestore";
}
int _detect_fs();
int _sanity_check_fs();
- bool test_mount_in_use();
+ bool test_mount_in_use() override;
int read_op_seq(uint64_t *seq);
int write_op_seq(int, uint64_t seq);
- int mount();
- int umount();
+ int mount() override;
+ int umount() override;
int validate_hobject_key(const hobject_t &obj) const override;
- unsigned get_max_attr_name_length() {
+ unsigned get_max_attr_name_length() override {
// xattr limit is 128; leave room for our prefixes (user.ceph._),
// some margin, and cap at 100
return 100;
}
- int mkfs();
- int mkjournal();
- bool wants_journal() {
+ int mkfs() override;
+ int mkjournal() override;
+ bool wants_journal() override {
return true;
}
- bool allows_journal() {
+ bool allows_journal() override {
return true;
}
- bool needs_journal() {
+ bool needs_journal() override {
return false;
}
void dump_perf_counters(Formatter *f) override {
int write_version_stamp();
int version_stamp_is_valid(uint32_t *version);
int update_version_stamp();
- int upgrade();
+ int upgrade() override;
- bool can_sort_nibblewise() {
+ bool can_sort_nibblewise() override {
return true; // i support legacy sort order
}
- void collect_metadata(map<string,string> *pm);
+ void collect_metadata(map<string,string> *pm) override;
int statfs(struct store_statfs_t *buf) override;
int _do_transactions(
vector<Transaction> &tls, uint64_t op_seq,
ThreadPool::TPHandle *handle);
- int do_transactions(vector<Transaction> &tls, uint64_t op_seq) {
+ int do_transactions(vector<Transaction> &tls, uint64_t op_seq) override {
return _do_transactions(tls, op_seq, 0);
}
void _do_transaction(
int queue_transactions(Sequencer *osr, vector<Transaction>& tls,
TrackedOpRef op = TrackedOpRef(),
- ThreadPool::TPHandle *handle = NULL);
+ ThreadPool::TPHandle *handle = NULL) override;
/**
* set replay guard xattr on given file
return 0;
}
using ObjectStore::exists;
- bool exists(const coll_t& cid, const ghobject_t& oid);
+ bool exists(const coll_t& cid, const ghobject_t& oid) override;
using ObjectStore::stat;
int stat(
const coll_t& cid,
const ghobject_t& oid,
struct stat *st,
- bool allow_eio = false);
+ bool allow_eio = false) override;
using ObjectStore::set_collection_opts;
int set_collection_opts(
const coll_t& cid,
- const pool_opts_t& opts);
+ const pool_opts_t& opts) override;
using ObjectStore::read;
int read(
const coll_t& cid,
size_t len,
bufferlist& bl,
uint32_t op_flags = 0,
- bool allow_eio = false);
+ bool allow_eio = false) override;
int _do_fiemap(int fd, uint64_t offset, size_t len,
map<uint64_t, uint64_t> *m);
int _do_seek_hole_data(int fd, uint64_t offset, size_t len,
map<uint64_t, uint64_t> *m);
using ObjectStore::fiemap;
- int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
+ int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) override;
int _touch(const coll_t& cid, const ghobject_t& oid);
int _write(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len,
void flush();
void sync_and_flush();
- int flush_journal();
- int dump_journal(ostream& out);
+ int flush_journal() override;
+ int dump_journal(ostream& out) override;
- void set_fsid(uuid_d u) {
+ void set_fsid(uuid_d u) override {
fsid = u;
}
- uuid_d get_fsid() { return fsid; }
+ uuid_d get_fsid() override { return fsid; }
- uint64_t estimate_objects_overhead(uint64_t num_objects);
+ uint64_t estimate_objects_overhead(uint64_t num_objects) override;
// DEBUG read error injection, an object is removed from both on delete()
Mutex read_error_lock;
set<ghobject_t> data_error_set; // read() will return -EIO
set<ghobject_t> mdata_error_set; // getattr(),stat() will return -EIO
- void inject_data_error(const ghobject_t &oid);
- void inject_mdata_error(const ghobject_t &oid);
+ void inject_data_error(const ghobject_t &oid) override;
+ void inject_mdata_error(const ghobject_t &oid) override;
void debug_obj_on_delete(const ghobject_t &oid);
bool debug_data_eio(const ghobject_t &oid);
bool debug_mdata_eio(const ghobject_t &oid);
- int snapshot(const string& name);
+ int snapshot(const string& name) override;
// attrs
using ObjectStore::getattr;
using ObjectStore::getattrs;
- int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr &bp);
- int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+ int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr &bp) override;
+ int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset) override;
int _setattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset,
const SequencerPosition &spos);
using ObjectStore::collection_list;
int collection_list(const coll_t& c,
const ghobject_t& start, const ghobject_t& end, int max,
- vector<ghobject_t> *ls, ghobject_t *next);
- int list_collections(vector<coll_t>& ls);
+ vector<ghobject_t> *ls, ghobject_t *next) override;
+ int list_collections(vector<coll_t>& ls) override;
int list_collections(vector<coll_t>& ls, bool include_temp);
int collection_stat(const coll_t& c, struct stat *st);
- bool collection_exists(const coll_t& c);
- int collection_empty(const coll_t& c, bool *empty);
+ bool collection_exists(const coll_t& c) override;
+ int collection_empty(const coll_t& c, bool *empty) override;
// omap (see ObjectStore.h for documentation)
using ObjectStore::omap_get;
int omap_get(const coll_t& c, const ghobject_t &oid, bufferlist *header,
- map<string, bufferlist> *out);
+ map<string, bufferlist> *out) override;
using ObjectStore::omap_get_header;
int omap_get_header(
const coll_t& c,
const ghobject_t &oid,
bufferlist *out,
- bool allow_eio = false);
+ bool allow_eio = false) override;
using ObjectStore::omap_get_keys;
- int omap_get_keys(const coll_t& c, const ghobject_t &oid, set<string> *keys);
+ int omap_get_keys(const coll_t& c, const ghobject_t &oid, set<string> *keys) override;
using ObjectStore::omap_get_values;
int omap_get_values(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
- map<string, bufferlist> *out);
+ map<string, bufferlist> *out) override;
using ObjectStore::omap_check_keys;
int omap_check_keys(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
- set<string> *out);
+ set<string> *out) override;
using ObjectStore::get_omap_iterator;
- ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid);
+ ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid) override;
int _create_collection(const coll_t& c, const SequencerPosition &spos);
int _destroy_collection(const coll_t& c);
coll_t dest,
const SequencerPosition &spos);
- virtual const char** get_tracked_conf_keys() const;
- virtual void handle_conf_change(const struct md_config_t *conf,
- const std::set <std::string> &changed);
+ const char** get_tracked_conf_keys() const override;
+ void handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed) override;
int set_throttle_params();
float m_filestore_commit_timeout;
bool m_filestore_journal_parallel;
bool m_filestore_splice;
public:
explicit GenericFileStoreBackend(FileStore *fs);
- virtual ~GenericFileStoreBackend() {}
+ ~GenericFileStoreBackend() override {}
- virtual const char *get_name() {
+ const char *get_name() override {
return "generic";
}
- virtual int detect_features();
- virtual int create_current();
- virtual bool can_checkpoint() { return false; }
- virtual int list_checkpoints(list<string>& ls) { return 0; }
- virtual int create_checkpoint(const string& name, uint64_t *cid) { return -EOPNOTSUPP; }
- virtual int sync_checkpoint(uint64_t id) { return -EOPNOTSUPP; }
- virtual int rollback_to(const string& name) { return -EOPNOTSUPP; }
- virtual int destroy_checkpoint(const string& name) { return -EOPNOTSUPP; }
- virtual int syncfs();
- virtual bool has_fiemap() { return ioctl_fiemap; }
- virtual bool has_seek_data_hole() { return seek_data_hole; }
- virtual int do_fiemap(int fd, off_t start, size_t len, struct fiemap **pfiemap);
- virtual int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) {
+ int detect_features() override;
+ int create_current() override;
+ bool can_checkpoint() override { return false; }
+ int list_checkpoints(list<string>& ls) override { return 0; }
+ int create_checkpoint(const string& name, uint64_t *cid) override { return -EOPNOTSUPP; }
+ int sync_checkpoint(uint64_t id) override { return -EOPNOTSUPP; }
+ int rollback_to(const string& name) override { return -EOPNOTSUPP; }
+ int destroy_checkpoint(const string& name) override { return -EOPNOTSUPP; }
+ int syncfs() override;
+ bool has_fiemap() override { return ioctl_fiemap; }
+ bool has_seek_data_hole() override { return seek_data_hole; }
+ int do_fiemap(int fd, off_t start, size_t len, struct fiemap **pfiemap) override;
+ int clone_range(int from, int to, uint64_t srcoff, uint64_t len, uint64_t dstoff) override {
return _copy_range(from, to, srcoff, len, dstoff);
}
- virtual int set_alloc_hint(int fd, uint64_t hint) { return -EOPNOTSUPP; }
- virtual bool has_splice() const { return use_splice; }
+ int set_alloc_hint(int fd, uint64_t hint) override { return -EOPNOTSUPP; }
+ bool has_splice() const override { return use_splice; }
private:
int _crc_load_or_init(int fd, SloppyCRCMap *cm);
int _crc_save(int fd, SloppyCRCMap *cm);
public:
- virtual int _crc_update_write(int fd, loff_t off, size_t len, const bufferlist& bl);
- virtual int _crc_update_truncate(int fd, loff_t off);
- virtual int _crc_update_zero(int fd, loff_t off, size_t len);
- virtual int _crc_update_clone_range(int srcfd, int destfd,
- loff_t srcoff, size_t len, loff_t dstoff);
- virtual int _crc_verify_read(int fd, loff_t off, size_t len, const bufferlist& bl,
- ostream *out);
+ int _crc_update_write(int fd, loff_t off, size_t len, const bufferlist& bl) override;
+ int _crc_update_truncate(int fd, loff_t off) override;
+ int _crc_update_zero(int fd, loff_t off, size_t len) override;
+ int _crc_update_clone_range(int srcfd, int destfd,
+ loff_t srcoff, size_t len, loff_t dstoff) override;
+ int _crc_verify_read(int fd, loff_t off, size_t len, const bufferlist& bl,
+ ostream *out) override;
};
#endif
split_multiplier(split_multiple) {}
/// @see CollectionIndex
- uint32_t collection_version() { return index_version; }
+ uint32_t collection_version() override { return index_version; }
/// @see CollectionIndex
- int cleanup();
+ int cleanup() override;
/// @see CollectionIndex
- int prep_delete();
+ int prep_delete() override;
/// @see CollectionIndex
int _split(
uint32_t match,
uint32_t bits,
CollectionIndex* dest
- );
+ ) override;
/// @see CollectionIndex
- virtual int apply_layout_settings();
+ int apply_layout_settings() override;
protected:
- int _init();
+ int _init() override;
int _created(
const vector<string> &path,
const ghobject_t &oid,
const string &mangled_name
- );
+ ) override;
int _remove(
const vector<string> &path,
const ghobject_t &oid,
const string &mangled_name
- );
+ ) override;
int _lookup(
const ghobject_t &oid,
vector<string> *path,
string *mangled_name,
int *hardlink
- );
+ ) override;
/**
* Pre-hash the collection to create folders according to the expected number
int _pre_hash_collection(
uint32_t pg_num,
uint64_t expected_num_objs
- );
+ ) override;
int _collection_list_partial(
const ghobject_t &start,
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
- );
+ ) override;
private:
/// Internal recursively remove path and its subdirs
int _recursive_remove(
apply_manager(cct, journal, finisher),
replaying(false) {}
- ~JournalingObjectStore() {
+ ~JournalingObjectStore() override {
}
};
}
}
- coll_t coll() const { return collection; }
+ coll_t coll() const override { return collection; }
/// Virtual destructor
- virtual ~LFNIndex() {}
+ ~LFNIndex() override {}
/// @see CollectionIndex
- int init();
+ int init() override;
/// @see CollectionIndex
- int cleanup() = 0;
+ int cleanup() override = 0;
/// @see CollectionIndex
int created(
const ghobject_t &oid,
const char *path
- );
+ ) override;
/// @see CollectionIndex
int unlink(
const ghobject_t &oid
- );
+ ) override;
/// @see CollectionIndex
int lookup(
const ghobject_t &oid,
IndexedPath *path,
int *hardlink
- );
+ ) override;
/// @see CollectionIndex;
int pre_hash_collection(
uint32_t pg_num,
uint64_t expected_num_objs
- );
+ ) override;
/// @see CollectionIndex
int collection_list_partial(
int max_count,
vector<ghobject_t> *ls,
ghobject_t *next
- );
+ ) override;
virtual int _split(
uint32_t match, //< [in] value to match
uint32_t match,
uint32_t bits,
CollectionIndex* dest
- ) {
+ ) override {
WRAP_RETRY(
r = _split(match, bits, dest);
goto out;
public:
explicit WBThrottle(CephContext *cct);
- ~WBThrottle();
+ ~WBThrottle() override;
void start();
void stop();
void throttle();
/// md_config_obs_t
- const char** get_tracked_conf_keys() const;
+ const char** get_tracked_conf_keys() const override;
void handle_conf_change(const md_config_t *conf,
- const std::set<std::string> &changed);
+ const std::set<std::string> &changed) override;
/// Thread
- void *entry();
+ void *entry() override;
};
#endif
int set_extsize(int fd, unsigned int val);
public:
explicit XfsFileStoreBackend(FileStore *fs);
- ~XfsFileStoreBackend() {}
- const char *get_name() {
+ ~XfsFileStoreBackend() override {}
+ const char *get_name() override {
return "xfs";
}
- int detect_features();
- int set_alloc_hint(int fd, uint64_t hint);
+ int detect_features() override;
+ int set_alloc_hint(int fd, uint64_t hint) override;
};
#endif /* CEPH_XFSFILESTOREBACKEND_H */
# endif
class XFS : public FS {
- const char *get_name() {
+ const char *get_name() override {
return "xfs";
}
- int set_alloc_hint(int fd, uint64_t hint);
+ int set_alloc_hint(int fd, uint64_t hint) override;
};
#endif
string head, tail;
public:
OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it);
- int seek_to_first();
- int upper_bound(const string &after);
- int lower_bound(const string &to);
- bool valid();
- int next(bool validate=true);
- string key();
- bufferlist value();
- int status() {
+ int seek_to_first() override;
+ int upper_bound(const string &after) override;
+ int lower_bound(const string &to) override;
+ bool valid() override;
+ int next(bool validate=true) override;
+ string key() override;
+ bufferlist value() override;
+ int status() override {
return 0;
}
};
: Sequencer_impl(cct),
parent(NULL) {
}
- ~OpSequencer() {
+ ~OpSequencer() override {
assert(q.empty());
}
q.push_back(*txc);
}
- void flush() {
+ void flush() override {
std::unique_lock<std::mutex> l(qlock);
while (!q.empty())
qcond.wait(l);
}
- bool flush_commit(Context *c) {
+ bool flush_commit(Context *c) override {
std::lock_guard<std::mutex> l(qlock);
if (q.empty()) {
return true;
struct KVSyncThread : public Thread {
KStore *store;
explicit KVSyncThread(KStore *s) : store(s) {}
- void *entry() {
+ void *entry() override {
store->_kv_sync_thread();
return NULL;
}
public:
KStore(CephContext *cct, const string& path);
- ~KStore();
+ ~KStore() override;
- string get_type() {
+ string get_type() override {
return "kstore";
}
- bool needs_journal() { return false; };
- bool wants_journal() { return false; };
- bool allows_journal() { return false; };
+ bool needs_journal() override { return false; };
+ bool wants_journal() override { return false; };
+ bool allows_journal() override { return false; };
static int get_block_device_fsid(const string& path, uuid_d *fsid);
- bool test_mount_in_use();
+ bool test_mount_in_use() override;
- int mount();
- int umount();
+ int mount() override;
+ int umount() override;
void _sync();
int fsck(bool deep) override;
int validate_hobject_key(const hobject_t &obj) const override {
return 0;
}
- unsigned get_max_attr_name_length() {
+ unsigned get_max_attr_name_length() override {
return 256; // arbitrary; there is no real limit internally
}
- int mkfs();
- int mkjournal() {
+ int mkfs() override;
+ int mkjournal() override {
return 0;
}
void dump_perf_counters(Formatter *f) override {
int statfs(struct store_statfs_t *buf) override;
using ObjectStore::exists;
- bool exists(const coll_t& cid, const ghobject_t& oid);
+ bool exists(const coll_t& cid, const ghobject_t& oid) override;
using ObjectStore::stat;
int stat(
const coll_t& cid,
const ghobject_t& oid,
struct stat *st,
- bool allow_eio = false); // struct stat?
+ bool allow_eio = false) override; // struct stat?
int set_collection_opts(
const coll_t& cid,
- const pool_opts_t& opts);
+ const pool_opts_t& opts) override;
using ObjectStore::read;
int read(
const coll_t& cid,
size_t len,
bufferlist& bl,
uint32_t op_flags = 0,
- bool allow_eio = false);
+ bool allow_eio = false) override;
int _do_read(
OnodeRef o,
uint64_t offset,
uint32_t op_flags = 0);
using ObjectStore::fiemap;
- int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
+ int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl) override;
using ObjectStore::getattr;
- int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value);
+ int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value) override;
using ObjectStore::getattrs;
- int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset);
+ int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset) override;
- int list_collections(vector<coll_t>& ls);
- bool collection_exists(const coll_t& c);
- int collection_empty(const coll_t& c, bool *empty);
+ int list_collections(vector<coll_t>& ls) override;
+ bool collection_exists(const coll_t& c) override;
+ int collection_empty(const coll_t& c, bool *empty) override;
int collection_list(
const coll_t& cid, const ghobject_t& start, const ghobject_t& end,
const ghobject_t &oid, ///< [in] Object containing omap
bufferlist *header, ///< [out] omap header
map<string, bufferlist> *out /// < [out] Key to value map
- );
+ ) override;
using ObjectStore::omap_get_header;
/// Get omap header
const ghobject_t &oid, ///< [in] Object containing omap
bufferlist *header, ///< [out] omap header
bool allow_eio = false ///< [in] don't assert on eio
- );
+ ) override;
using ObjectStore::omap_get_keys;
/// Get keys defined on oid
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
set<string> *keys ///< [out] Keys defined on oid
- );
+ ) override;
using ObjectStore::omap_get_values;
/// Get key values
const ghobject_t &oid, ///< [in] Object containing omap
const set<string> &keys, ///< [in] Keys to get
map<string, bufferlist> *out ///< [out] Returned keys and values
- );
+ ) override;
using ObjectStore::omap_check_keys;
/// Filters keys into out which are defined on oid
const ghobject_t &oid, ///< [in] Object containing omap
const set<string> &keys, ///< [in] Keys to check
set<string> *out ///< [out] Subset of keys defined on oid
- );
+ ) override;
using ObjectStore::get_omap_iterator;
ObjectMap::ObjectMapIterator get_omap_iterator(
const coll_t& cid, ///< [in] collection
const ghobject_t &oid ///< [in] object
- );
+ ) override;
- void set_fsid(uuid_d u) {
+ void set_fsid(uuid_d u) override {
fsid = u;
}
- uuid_d get_fsid() {
+ uuid_d get_fsid() override {
return fsid;
}
return num_objects * 300; //assuming per-object overhead is 300 bytes
}
- objectstore_perf_stat_t get_cur_stats() {
+ objectstore_perf_stat_t get_cur_stats() override {
return objectstore_perf_stat_t();
}
- const PerfCounters* get_perf_counters() const {
+ const PerfCounters* get_perf_counters() const override {
return logger;
}
Sequencer *osr,
vector<Transaction>& tls,
TrackedOpRef op = TrackedOpRef(),
- ThreadPool::TPHandle *handle = NULL);
+ ThreadPool::TPHandle *handle = NULL) override;
private:
// --------------------------------------------------------
coll_lock("MemStore::coll_lock"),
finisher(cct),
used_bytes(0) {}
- ~MemStore() { }
+ ~MemStore() override { }
string get_type() override {
return "memstore";
struct stat *st, bool allow_eio = false) override;
int set_collection_opts(
const coll_t& cid,
- const pool_opts_t& opts);
+ const pool_opts_t& opts) override;
int read(
const coll_t& cid,
const ghobject_t& oid,
objectstore_perf_stat_t get_cur_stats() override;
- const PerfCounters* get_perf_counters() const {
+ const PerfCounters* get_perf_counters() const override {
return nullptr;
}
}
replies.clear();
}
- ~SendPushReplies() {
+ ~SendPushReplies() override {
for (map<int, MOSDPGPushReply*>::iterator i = replies.begin();
i != replies.end();
++i) {
struct RecoveryMessages;
class ECBackend : public PGBackend {
public:
- RecoveryHandle *open_recovery_op();
+ RecoveryHandle *open_recovery_op() override;
void run_recovery_op(
RecoveryHandle *h,
int priority
- );
+ ) override;
void recover_object(
const hobject_t &hoid,
ObjectContextRef head,
ObjectContextRef obc,
RecoveryHandle *h
- );
+ ) override;
bool handle_message(
OpRequestRef op
- );
+ ) override;
bool can_handle_while_inactive(
OpRequestRef op
- );
+ ) override;
friend struct SubWriteApplied;
friend struct SubWriteCommitted;
void sub_write_applied(
);
/// @see ReadOp below
- void check_recovery_sources(const OSDMapRef& osdmap);
+ void check_recovery_sources(const OSDMapRef& osdmap) override;
- void on_change();
- void clear_recovery_state();
+ void on_change() override;
+ void clear_recovery_state() override;
- void on_flushed();
+ void on_flushed() override;
- void dump_recovery_info(Formatter *f) const;
+ void dump_recovery_info(Formatter *f) const override;
void call_write_ordered(std::function<void(void)> &&cb) override;
ceph_tid_t tid,
osd_reqid_t reqid,
OpRequestRef op
- );
+ ) override;
int objects_read_sync(
const hobject_t &hoid,
uint64_t off,
uint64_t len,
uint32_t op_flags,
- bufferlist *bl);
+ bufferlist *bl) override;
/**
* Async read mechanism
const list<pair<boost::tuple<uint64_t, uint64_t, uint32_t>,
pair<bufferlist*, Context*> > > &to_read,
Context *on_complete,
- bool fast_read = false);
+ bool fast_read = false) override;
template <typename Func>
void objects_read_async_no_cache(
want.insert(i);
}
}
- bool operator()(const set<pg_shard_t> &_have) const {
+ bool operator()(const set<pg_shard_t> &_have) const override {
set<int> have;
for (set<pg_shard_t>::const_iterator i = _have.begin();
i != _have.end();
return ec_impl->minimum_to_decode(want, have, &min) == 0;
}
};
- IsPGRecoverablePredicate *get_is_recoverable_predicate() {
+ IsPGRecoverablePredicate *get_is_recoverable_predicate() override {
return new ECRecPred(ec_impl);
}
ECReadPred(
pg_shard_t whoami,
ErasureCodeInterfaceRef ec_impl) : whoami(whoami), rec_pred(ec_impl) {}
- bool operator()(const set<pg_shard_t> &_have) const {
+ bool operator()(const set<pg_shard_t> &_have) const override {
return _have.count(whoami) && rec_pred(_have);
}
};
- IsPGReadablePredicate *get_is_readable_predicate() {
+ IsPGReadablePredicate *get_is_readable_predicate() override {
return new ECReadPred(get_parent()->whoami_shard(), ec_impl);
}
int objects_get_attrs(
const hobject_t &hoid,
- map<string, bufferlist> *out);
+ map<string, bufferlist> *out) override;
void rollback_append(
const hobject_t &hoid,
uint64_t old_size,
- ObjectStore::Transaction *t);
+ ObjectStore::Transaction *t) override;
- bool scrub_supported() { return true; }
- bool auto_repair_supported() const { return true; }
+ bool scrub_supported() override { return true; }
+ bool auto_repair_supported() const override { return true; }
void be_deep_scrub(
const hobject_t &obj,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle);
- uint64_t be_get_ondisk_size(uint64_t logical_size) {
+ ThreadPool::TPHandle &handle) override;
+ uint64_t be_get_ondisk_size(uint64_t logical_size) override {
return sinfo.logical_to_next_chunk_offset(logical_size);
}
void _failed_push(const hobject_t &hoid,
: fpp_micro(o.fpp_micro),
target_size(o.target_size),
seed(o.seed) {}
- ~Params() {}
+ ~Params() override {}
double get_fpp() const {
return (double)fpp_micro / 1000000.0;
struct AgentThread : public Thread {
OSDService *osd;
explicit AgentThread(OSDService *o) : osd(o) {}
- void *entry() {
+ void *entry() override {
osd->agent_entry();
return NULL;
}
SafeTimer tick_timer_without_osd_lock;
public:
// config observer bits
- virtual const char** get_tracked_conf_keys() const;
- virtual void handle_conf_change(const struct md_config_t *conf,
- const std::set <std::string> &changed);
+ const char** get_tracked_conf_keys() const override;
+ void handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed) override;
void update_log_config();
void check_config();
struct T_Heartbeat : public Thread {
OSD *osd;
explicit T_Heartbeat(OSD *o) : osd(o) {}
- void *entry() {
+ void *entry() override {
osd->heartbeat_entry();
return 0;
}
OSD *osd;
explicit HeartbeatDispatcher(OSD *o) : Dispatcher(o->cct), osd(o) {}
- bool ms_can_fast_dispatch_any() const { return true; }
+ bool ms_can_fast_dispatch_any() const override { return true; }
bool ms_can_fast_dispatch(const Message *m) const override {
switch (m->get_type()) {
case CEPH_MSG_PING:
return false;
}
}
- void ms_fast_dispatch(Message *m) {
+ void ms_fast_dispatch(Message *m) override {
osd->heartbeat_dispatch(m);
}
- bool ms_dispatch(Message *m) {
+ bool ms_dispatch(Message *m) override {
return osd->heartbeat_dispatch(m);
}
- bool ms_handle_reset(Connection *con) {
+ bool ms_handle_reset(Connection *con) override {
return osd->heartbeat_reset(con);
}
- void ms_handle_remote_reset(Connection *con) {}
- bool ms_handle_refused(Connection *con) {
+ void ms_handle_remote_reset(Connection *con) override {}
+ bool ms_handle_refused(Connection *con) override {
return osd->ms_handle_refused(con);
}
bool ms_verify_authorizer(Connection *con, int peer_type,
int protocol, bufferlist& authorizer_data, bufferlist& authorizer_reply,
- bool& isvalid, CryptoKey& session_key) {
+ bool& isvalid, CryptoKey& session_key) override {
isvalid = true;
return true;
}
shard_list.push_back(one_shard);
}
}
- ~ShardedOpWQ() {
+ ~ShardedOpWQ() override {
while (!shard_list.empty()) {
delete shard_list.back();
shard_list.pop_back();
void clear_pg_slots();
/// try to do some work
- void _process(uint32_t thread_index, heartbeat_handle_d *hb);
+ void _process(uint32_t thread_index, heartbeat_handle_d *hb) override;
/// enqueue a new item
- void _enqueue(pair <spg_t, PGQueueable> item);
+ void _enqueue(pair <spg_t, PGQueueable> item) override;
/// requeue an old item (at the front of the line)
- void _enqueue_front(pair <spg_t, PGQueueable> item);
+ void _enqueue_front(pair <spg_t, PGQueueable> item) override;
- void return_waiting_threads() {
+ void return_waiting_threads() override {
for(uint32_t i = 0; i < num_shards; i++) {
ShardData* sdata = shard_list[i];
assert (NULL != sdata);
} remove_wq;
private:
- bool ms_can_fast_dispatch_any() const { return true; }
+ bool ms_can_fast_dispatch_any() const override { return true; }
bool ms_can_fast_dispatch(const Message *m) const override {
switch (m->get_type()) {
case CEPH_MSG_OSD_OP:
return false;
}
}
- void ms_fast_dispatch(Message *m);
- void ms_fast_preprocess(Message *m);
- bool ms_dispatch(Message *m);
- bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new);
+ void ms_fast_dispatch(Message *m) override;
+ void ms_fast_preprocess(Message *m) override;
+ bool ms_dispatch(Message *m) override;
+ bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new) override;
bool ms_verify_authorizer(Connection *con, int peer_type,
int protocol, bufferlist& authorizer, bufferlist& authorizer_reply,
- bool& isvalid, CryptoKey& session_key);
- void ms_handle_connect(Connection *con);
- void ms_handle_fast_connect(Connection *con);
- void ms_handle_fast_accept(Connection *con);
- bool ms_handle_reset(Connection *con);
- void ms_handle_remote_reset(Connection *con) {}
- bool ms_handle_refused(Connection *con);
+ bool& isvalid, CryptoKey& session_key) override;
+ void ms_handle_connect(Connection *con) override;
+ void ms_handle_fast_connect(Connection *con) override;
+ void ms_handle_fast_accept(Connection *con) override;
+ bool ms_handle_reset(Connection *con) override;
+ void ms_handle_remote_reset(Connection *con) override {}
+ bool ms_handle_refused(Connection *con) override;
io_queue get_io_queue() const {
if (cct->_conf->osd_op_queue == "debug_random") {
Messenger *hb_back_server,
Messenger *osdc_messenger,
MonClient *mc, const std::string &dev, const std::string &jdev);
- ~OSD();
+ ~OSD() override;
// static bits
static int mkfs(CephContext *cct, ObjectStore *store,
: Job(osdmap), mapping(m) {
mapping->_start(*osdmap);
}
- void process(int64_t pool, unsigned ps_begin, unsigned ps_end) {
+ void process(int64_t pool, unsigned ps_begin, unsigned ps_end) override {
mapping->_update_range(*osdmap, pool, ps_begin, ps_end);
}
- void complete() {
+ void complete() override {
mapping->_finish(*osdmap);
}
};
return classes_;
}
- void _dump(Formatter *f) const;
+ void _dump(Formatter *f) const override;
bool has_feature(uint64_t f) const {
return request->get_connection()->has_feature(f);
OpRequest(Message *req, OpTracker *tracker);
protected:
- void _dump_op_descriptor_unlocked(ostream& stream) const;
- void _unregistered();
+ void _dump_op_descriptor_unlocked(ostream& stream) const override;
+ void _unregistered() override;
public:
- ~OpRequest() {
+ ~OpRequest() override {
request->put();
}
}
}
- const char *state_string() const {
+ const char *state_string() const override {
switch(latest_flag_point) {
case flag_queued_for_pg: return "queued for pg";
case flag_reached_pg: return "reached pg";
virtual PGBackend *get_pgbackend() = 0;
public:
- std::string gen_prefix() const;
- CephContext *get_cct() const { return cct; }
- unsigned get_subsys() const { return ceph_subsys_osd; }
+ std::string gen_prefix() const override;
+ CephContext *get_cct() const override { return cct; }
+ unsigned get_subsys() const override { return ceph_subsys_osd; }
/*** PG ****/
void update_snap_mapper_bits(uint32_t bits) {
eversion_t v;
C_UpdateLastRollbackInfoTrimmedToApplied(PG *pg, epoch_t e, eversion_t v)
: pg(pg), e(e), v(v) {}
- void finish(int) {
+ void finish(int) override {
pg->lock();
if (!pg->pg_has_reset_since(e)) {
pg->last_rollback_info_trimmed_to_applied = v;
PGLogEntryHandler(PG *pg, ObjectStore::Transaction *t) : pg(pg), t(t) {}
// LogEntryHandler
- void remove(const hobject_t &hoid) {
+ void remove(const hobject_t &hoid) override {
pg->get_pgbackend()->remove(hoid, t);
}
- void try_stash(const hobject_t &hoid, version_t v) {
+ void try_stash(const hobject_t &hoid, version_t v) override {
pg->get_pgbackend()->try_stash(hoid, v, t);
}
- void rollback(const pg_log_entry_t &entry) {
+ void rollback(const pg_log_entry_t &entry) override {
assert(entry.can_rollback());
pg->get_pgbackend()->rollback(entry, t);
}
- void rollforward(const pg_log_entry_t &entry) {
+ void rollforward(const pg_log_entry_t &entry) override {
pg->get_pgbackend()->rollforward(entry, t);
}
- void trim(const pg_log_entry_t &entry) {
+ void trim(const pg_log_entry_t &entry) override {
pg->get_pgbackend()->trim(entry, t);
}
};
EVT evt;
QueuePeeringEvt(PG *pg, epoch_t epoch, EVT evt) :
pg(pg), epoch(epoch), evt(evt) {}
- void finish(int r) {
+ void finish(int r) override {
pg->lock();
pg->queue_peering_event(PG::CephPeeringEvtRef(
new PG::CephPeeringEvt(
public:
PG(OSDService *o, OSDMapRef curmap,
const PGPool &pool, spg_t p);
- virtual ~PG();
+ ~PG() override;
private:
// Prevent copying
struct PGLog : DoutPrefixProvider {
DoutPrefixProvider *prefix_provider;
- string gen_prefix() const {
+ string gen_prefix() const override {
return prefix_provider ? prefix_provider->gen_prefix() : "";
}
- unsigned get_subsys() const {
+ unsigned get_subsys() const override {
return prefix_provider ? prefix_provider->get_subsys() :
(unsigned)ceph_subsys_osd;
}
- CephContext *get_cct() const {
+ CephContext *get_cct() const override {
return cct;
}
explicit read_log_and_missing_error(const char *what) {
snprintf(buf, sizeof(buf), "read_log_and_missing_error: %s", what);
}
- const char *what() const throw () {
+ const char *what() const throw () override {
return buf;
}
private:
public:
/// Provide the final size of the copied object to the CopyCallback
- ~CopyCallback() {}
+ ~CopyCallback() override {}
};
template <typename T>
opcontext->async_read_result = r;
opcontext->finish_read(pg);
}
- ~OnReadComplete() {}
+ ~OnReadComplete() override {}
};
class PrimaryLogPG::C_OSD_AppliedRecoveredObject : public Context {
: results(NULL),
retval(0),
ctx(ctx_) {}
- ~CopyFromCallback() {}
+ ~CopyFromCallback() override {}
void finish(PrimaryLogPG::CopyCallbackResults results_) override {
results = results_.get<1>();
return 0;
}
- ~PGLSPlainFilter() {}
+ ~PGLSPlainFilter() override {}
bool filter(const hobject_t &obj, bufferlist& xattr_data,
bufferlist& outdata) override;
};
return 0;
}
- ~PGLSParentFilter() {}
+ ~PGLSParentFilter() override {}
bool filter(const hobject_t &obj, bufferlist& xattr_data,
bufferlist& outdata) override;
};
return manager.try_get_read_lock(hoid, obc);
}
- void release_locks(ObcLockManager &manager) {
+ void release_locks(ObcLockManager &manager) override {
release_object_locks(manager);
}
friend struct C_Flush;
// -- scrub --
- virtual bool _range_available_for_scrub(
+ bool _range_available_for_scrub(
const hobject_t &begin, const hobject_t &end) override;
- virtual void scrub_snapshot_metadata(
+ void scrub_snapshot_metadata(
ScrubMap &map,
const std::map<hobject_t, pair<uint32_t, uint32_t>> &missing_digest) override;
- virtual void _scrub_clear_state() override;
- virtual void _scrub_finish() override;
+ void _scrub_clear_state() override;
+ void _scrub_finish() override;
object_stat_collection_t scrub_cstat;
- virtual void _split_into(pg_t child_pgid, PG *child,
- unsigned split_bits) override;
+ void _split_into(pg_t child_pgid, PG *child,
+ unsigned split_bits) override;
void apply_and_flush_repops(bool requeue);
void calc_trim_to() override;
public:
PrimaryLogPG(OSDService *o, OSDMapRef curmap,
const PGPool &_pool, spg_t p);
- ~PrimaryLogPG() {}
+ ~PrimaryLogPG() override {}
int do_command(
cmdmap_t cmdmap,
c->complete(r);
c = NULL;
}
- ~AsyncReadCallback() {
+ ~AsyncReadCallback() override {
delete c;
}
};
RPGHandle *_open_recovery_op() {
return new RPGHandle();
}
- PGBackend::RecoveryHandle *open_recovery_op() {
+ PGBackend::RecoveryHandle *open_recovery_op() override {
return _open_recovery_op();
}
/// @see PGBackend::run_recovery_op
void run_recovery_op(
PGBackend::RecoveryHandle *h,
- int priority);
+ int priority) override;
/// @see PGBackend::recover_object
void recover_object(
ObjectContextRef head,
ObjectContextRef obc,
RecoveryHandle *h
- );
+ ) override;
- void check_recovery_sources(const OSDMapRef& osdmap);
+ void check_recovery_sources(const OSDMapRef& osdmap) override;
/// @see PGBackend::delay_message_until_active
- bool can_handle_while_inactive(OpRequestRef op);
+ bool can_handle_while_inactive(OpRequestRef op) override;
/// @see PGBackend::handle_message
bool handle_message(
OpRequestRef op
- );
+ ) override;
- void on_change();
- void clear_recovery_state();
- void on_flushed();
+ void on_change() override;
+ void clear_recovery_state() override;
+ void on_flushed() override;
class RPCRecPred : public IsPGRecoverablePredicate {
public:
- bool operator()(const set<pg_shard_t> &have) const {
+ bool operator()(const set<pg_shard_t> &have) const override {
return !have.empty();
}
};
- IsPGRecoverablePredicate *get_is_recoverable_predicate() {
+ IsPGRecoverablePredicate *get_is_recoverable_predicate() override {
return new RPCRecPred;
}
pg_shard_t whoami;
public:
explicit RPCReadPred(pg_shard_t whoami) : whoami(whoami) {}
- bool operator()(const set<pg_shard_t> &have) const {
+ bool operator()(const set<pg_shard_t> &have) const override {
return have.count(whoami);
}
};
- IsPGReadablePredicate *get_is_readable_predicate() {
+ IsPGReadablePredicate *get_is_readable_predicate() override {
return new RPCReadPred(get_parent()->whoami_shard());
}
- virtual void dump_recovery_info(Formatter *f) const {
+ void dump_recovery_info(Formatter *f) const override {
{
f->open_array_section("pull_from_peer");
for (map<pg_shard_t, set<hobject_t> >::const_iterator i = pull_from_peer.begin();
uint64_t off,
uint64_t len,
uint32_t op_flags,
- bufferlist *bl);
+ bufferlist *bl) override;
void objects_read_async(
const hobject_t &hoid,
const list<pair<boost::tuple<uint64_t, uint64_t, uint32_t>,
pair<bufferlist*, Context*> > > &to_read,
Context *on_complete,
- bool fast_read = false);
+ bool fast_read = false) override;
private:
// push
ceph_tid_t tid,
osd_reqid_t reqid,
OpRequestRef op
- );
+ ) override;
private:
Message * generate_subop(
void sub_op_modify_applied(RepModifyRef rm);
void sub_op_modify_commit(RepModifyRef rm);
- bool scrub_supported() { return true; }
- bool auto_repair_supported() const { return false; }
+ bool scrub_supported() override { return true; }
+ bool auto_repair_supported() const override { return false; }
void be_deep_scrub(
const hobject_t &obj,
uint32_t seed,
ScrubMap::object &o,
- ThreadPool::TPHandle &handle);
- uint64_t be_get_ondisk_size(uint64_t logical_size) { return logical_size; }
+ ThreadPool::TPHandle &handle) override;
+ uint64_t be_get_ondisk_size(uint64_t logical_size) override { return logical_size; }
};
#endif
: cid(cid), hoid(hoid), t(t) {}
public:
void set_keys(
- const std::map<std::string, bufferlist> &to_set) {
+ const std::map<std::string, bufferlist> &to_set) override {
t->omap_setkeys(cid, hoid, to_set);
}
void remove_keys(
- const std::set<std::string> &to_remove) {
+ const std::set<std::string> &to_remove) override {
t->omap_rmkeys(cid, hoid, to_remove);
}
void add_callback(
- Context *c) {
+ Context *c) override {
t->register_on_applied(c);
}
};
os(os), cid(cid), hoid(hoid) {}
int get_keys(
const std::set<std::string> &keys,
- std::map<std::string, bufferlist> *out);
+ std::map<std::string, bufferlist> *out) override;
int get_next(
const std::string &key,
- pair<std::string, bufferlist> *next);
+ pair<std::string, bufferlist> *next) override;
};
/**
ObjectCacher *oc;
public:
explicit FlusherThread(ObjectCacher *o) : oc(o) {}
- void *entry() {
+ void *entry() override {
oc->flusher_entry();
return 0;
}
second = NULL;
}
- ~C_TwoContexts() {
+ ~C_TwoContexts() override {
delete first;
delete second;
}
C_ObjectOperation_stat(uint64_t *ps, ceph::real_time *pm, time_t *pt, struct timespec *_pts,
int *prval)
: psize(ps), pmtime(pm), ptime(pt), pts(_pts), prval(prval) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
try {
std::map<uint64_t, uint64_t> *extents,
int *prval)
: data_bl(data_bl), extents(extents), prval(prval) {}
- void finish(int r) {
+ void finish(int r) override {
bufferlist::iterator iter = bl.begin();
if (r >= 0) {
try {
*ptruncated = false;
}
}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
try {
*ptruncated = false;
}
}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
try {
int *prval;
C_ObjectOperation_decodewatchers(list<obj_watch_t> *pw, int *pr)
: pwatchers(pw), prval(pr) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
try {
int *prval;
C_ObjectOperation_decodesnaps(librados::snap_set_t *ps, int *pr)
: psnaps(ps), prval(pr) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
try {
out_truncate_seq(otseq),
out_truncate_size(otsize),
prval(r) {}
- void finish(int r) {
+ void finish(int r) override {
// reqids are copied on ENOENT
if (r < 0 && r != -ENOENT)
return;
int *prval;
C_ObjectOperation_isdirty(bool *p, int *r)
: pisdirty(p), prval(r) {}
- void finish(int r) {
+ void finish(int r) override {
if (r < 0)
return;
try {
ceph::real_time> > *ut,
int *r)
: ptls(t), putls(ut), prval(r) {}
- void finish(int r) {
+ void finish(int r) override {
if (r < 0)
return;
try {
class Objecter : public md_config_obs_t, public Dispatcher {
public:
// config observer bits
- virtual const char** get_tracked_conf_keys() const;
- virtual void handle_conf_change(const struct md_config_t *conf,
- const std::set <std::string> &changed);
+ const char** get_tracked_conf_keys() const override;
+ void handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed) override;
public:
Messenger *messenger;
}
private:
- ~Op() {
+ ~Op() override {
while (!out_handler.empty()) {
delete out_handler.back();
out_handler.pop_back();
version_t latest;
C_Op_Map_Latest(Objecter *o, ceph_tid_t t) : objecter(o), tid(t),
latest(0) {}
- void finish(int r);
+ void finish(int r) override;
};
struct C_Command_Map_Latest : public Context {
version_t latest;
C_Command_Map_Latest(Objecter *o, ceph_tid_t t) : objecter(o), tid(t),
latest(0) {}
- void finish(int r);
+ void finish(int r) override;
};
struct C_Stat : public Context {
Context *fin;
C_Stat(uint64_t *ps, ceph::real_time *pm, Context *c) :
psize(ps), pmtime(pm), fin(c) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
uint64_t s;
Context *fin;
C_GetAttrs(map<string, bufferlist>& set, Context *c) : attrset(set),
fin(c) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
bufferlist::iterator p = bl.begin();
::decode(attrset, p);
epoch_t epoch;
C_NList(NListContext *lc, Context * finish, Objecter *ob) :
list_context(lc), final_finish(finish), objecter(ob), epoch(0) {}
- void finish(int r) {
+ void finish(int r) override {
if (r >= 0) {
objecter->_nlist_reply(list_context, r, final_finish, epoch);
} else {
}
private:
- ~LingerOp() {
+ ~LingerOp() override {
delete watch_context;
}
};
C_Linger_Commit(Objecter *o, LingerOp *l) : objecter(o), info(l) {
info->get();
}
- ~C_Linger_Commit() {
+ ~C_Linger_Commit() override {
info->put();
}
- void finish(int r) {
+ void finish(int r) override {
objecter->_linger_commit(info, r, outbl);
}
};
C_Linger_Reconnect(Objecter *o, LingerOp *l) : objecter(o), info(l) {
info->get();
}
- ~C_Linger_Reconnect() {
+ ~C_Linger_Reconnect() override {
info->put();
}
- void finish(int r) {
+ void finish(int r) override {
objecter->_linger_reconnect(info, r);
}
};
: objecter(o), info(l), register_gen(info->register_gen) {
info->get();
}
- ~C_Linger_Ping() {
+ ~C_Linger_Ping() override {
info->put();
}
- void finish(int r) {
+ void finish(int r) override {
objecter->_linger_ping(info, r, sent, register_gen);
}
};
version_t latest;
C_Linger_Map_Latest(Objecter *o, uint64_t id) :
objecter(o), linger_id(id), latest(0) {}
- void finish(int r);
+ void finish(int r) override;
};
// -- osd sessions --
num_locks(cct->_conf->objecter_completion_locks_per_session),
completion_locks(new std::mutex[num_locks]) {}
- ~OSDSession();
+ ~OSDSession() override;
bool is_homeless() { return (osd == -1); }
epoch_barrier(0),
retry_writes_after_first_reply(cct->_conf->objecter_retry_writes_after_first_reply)
{ }
- ~Objecter();
+ ~Objecter() override;
void init();
void start(const OSDMap *o = nullptr);
// messages
public:
- bool ms_dispatch(Message *m);
- bool ms_can_fast_dispatch_any() const {
+ bool ms_dispatch(Message *m) override;
+ bool ms_can_fast_dispatch_any() const override {
return true;
}
bool ms_can_fast_dispatch(const Message *m) const override {
return false;
}
}
- void ms_fast_dispatch(Message *m) {
+ void ms_fast_dispatch(Message *m) override {
ms_dispatch(m);
}
extents.swap(e);
resultbl.swap(r);
}
- void finish(int r) {
+ void finish(int r) override {
objecter->_sg_read_finish(extents, resultbl, bl, onfinish);
}
};
op_flags);
}
- void ms_handle_connect(Connection *con);
- bool ms_handle_reset(Connection *con);
- void ms_handle_remote_reset(Connection *con);
- bool ms_handle_refused(Connection *con);
+ void ms_handle_connect(Connection *con) override;
+ bool ms_handle_reset(Connection *con) override;
+ void ms_handle_remote_reset(Connection *con) override;
+ bool ms_handle_refused(Connection *con) override;
bool ms_get_authorizer(int dest_type,
AuthAuthorizer **authorizer,
- bool force_new);
+ bool force_new) override;
void blacklist_self(bool set);