summaryrefslogtreecommitdiffstats
path: root/src/journal/Journaler.h
diff options
context:
space:
mode:
authorMykola Golub <mgolub@mirantis.com>2015-09-18 08:23:53 +0200
committerMykola Golub <mgolub@mirantis.com>2015-12-04 12:18:30 +0100
commite8a584ffc1ddd12e0f55a3b0263d8f29322b0ea4 (patch)
treecccbc9ac4097a9e1c4d7a0a8ecd6dacc05fd5b32 /src/journal/Journaler.h
parentlibrbd: humanize ImageWatcher and Journal states in debug log (diff)
downloadceph-e8a584ffc1ddd12e0f55a3b0263d8f29322b0ea4.tar.xz
ceph-e8a584ffc1ddd12e0f55a3b0263d8f29322b0ea4.zip
rbd: add new journal rbd commands
Also, extend 'rbd info' to output journal spec if journaling is enabled. Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Diffstat (limited to 'src/journal/Journaler.h')
-rw-r--r--src/journal/Journaler.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/journal/Journaler.h b/src/journal/Journaler.h
index 1230e409b2d..48c800d407f 100644
--- a/src/journal/Journaler.h
+++ b/src/journal/Journaler.h
@@ -26,22 +26,28 @@ class ReplayHandler;
class Journaler {
public:
+
+ static std::string header_oid(const std::string &journal_id);
+ static std::string object_oid_prefix(int pool_id,
+ const std::string &journal_id);
+
Journaler(librados::IoCtx &header_ioctx, const std::string &journal_id,
const std::string &client_id, double commit_interval);
~Journaler();
int exists(bool *header_exists) const;
int create(uint8_t order, uint8_t splay_width, int64_t pool_id);
- int remove();
+ int remove(bool force);
void init(Context *on_init);
+ void shutdown();
int register_client(const std::string &description);
int unregister_client();
void start_replay(ReplayHandler *replay_handler);
void start_live_replay(ReplayHandler *replay_handler, double interval);
- bool try_pop_front(ReplayEntry *replay_entry);
+ bool try_pop_front(ReplayEntry *replay_entry, std::string* tag = NULL);
void stop_replay();
void start_append(int flush_interval, uint64_t flush_bytes, double flush_age);
@@ -52,6 +58,8 @@ public:
void committed(const ReplayEntry &replay_entry);
void committed(const Future &future);
+ void get_metadata(uint8_t *order, uint8_t *splay_width, int64_t *pool_id);
+
private:
struct C_InitJournaler : public Context {
Journaler *journaler;