chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-bus: add extra assert check
[elogind.git]
/
src
/
journal-remote
/
journal-remote-write.h
diff --git
a/src/journal-remote/journal-remote-write.h
b/src/journal-remote/journal-remote-write.h
index 879821641591a3b1cd5ea17c0ddf21a1d6761bb0..aa381c661ee32ec7cb027bc544a60d949c629fd4 100644
(file)
--- a/
src/journal-remote/journal-remote-write.h
+++ b/
src/journal-remote/journal-remote-write.h
@@
-25,6
+25,8
@@
#include "journal-file.h"
#include "journal-file.h"
+typedef struct RemoteServer RemoteServer;
+
struct iovec_wrapper {
struct iovec *iovec;
size_t size_bytes;
struct iovec_wrapper {
struct iovec *iovec;
size_t size_bytes;
@@
-34,18
+36,39
@@
struct iovec_wrapper {
int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len);
void iovw_free_contents(struct iovec_wrapper *iovw);
size_t iovw_size(struct iovec_wrapper *iovw);
int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len);
void iovw_free_contents(struct iovec_wrapper *iovw);
size_t iovw_size(struct iovec_wrapper *iovw);
+void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new);
typedef struct Writer {
JournalFile *journal;
JournalMetrics metrics;
typedef struct Writer {
JournalFile *journal;
JournalMetrics metrics;
+
MMapCache *mmap;
MMapCache *mmap;
+ RemoteServer *server;
+ char *hashmap_key;
+
uint64_t seqnum;
uint64_t seqnum;
+
+ int n_ref;
} Writer;
} Writer;
-int writer_init(Writer *s);
-int writer_close(Writer *s);
+Writer* writer_new(RemoteServer* server);
+Writer* writer_free(Writer *w);
+
+Writer* writer_ref(Writer *w);
+Writer* writer_unref(Writer *w);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Writer*, writer_unref);
+#define _cleanup_writer_unref_ _cleanup_(writer_unrefp)
+
int writer_write(Writer *s,
struct iovec_wrapper *iovw,
dual_timestamp *ts,
bool compress,
bool seal);
int writer_write(Writer *s,
struct iovec_wrapper *iovw,
dual_timestamp *ts,
bool compress,
bool seal);
+
+typedef enum JournalWriteSplitMode {
+ JOURNAL_WRITE_SPLIT_NONE,
+ JOURNAL_WRITE_SPLIT_HOST,
+ _JOURNAL_WRITE_SPLIT_MAX,
+ _JOURNAL_WRITE_SPLIT_INVALID = -1
+} JournalWriteSplitMode;