lessfs  1.7.0
About: Lessfs is a inline data deduplicating file system for Linux (implemented in user space with FUSE; especially useful for backup purposes).
  Fossies Dox: lessfs-1.7.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

lib_repl.h
Go to the documentation of this file.
1 // replication_msg : db (char), op (char), ksize (int),vsize (int), key (char *),value (char *), crc32 (int)
2 typedef struct {
3  unsigned char database; // 0=dbdta,1=dbu,2=dbb
4  unsigned char operation; // 0=write,1=delete,2=read
5  unsigned char *key;
6  int ksize;
7  unsigned char *value;
8  int vsize;
9  int crc32;
11 
12 #define REPLWRITE 0
13 #define REPLDELETE 1
14 #define REPLREAD 2
15 #define REPLDUPWRITE 3
16 #define REPLDELETECURKEY 4
17 #define REPLSETNEXTOFFSET 5
18 #define TRANSACTIONCOMMIT 6
19 #define TRANSACTIONABORT 7
20 
21 #define DBDTA 0
22 #define DBU 1
23 #define DBB 2
24 #define DBP 3
25 #define DBS 4
26 #define DBL 5
27 #define FREELIST 6
28 #define DBDIRENT 7
29 #define TRANSACTIONS 8
30 #define NEXTOFFSET 98
31 #define FDBDTA 99
32 #define WRITTEN 254
33 
34 #define ACK 6
35 #define NAK 21
36 #define WATCHDIR_SLEEPINTERVAL 10
37 #define REPLOG_DELAY 15*60 // Allow a 15 minutes delay before sending an incompleted replog
38 
39 int reconnect();
40 void *replication_worker(void *);
41 void process_message(char *, int);
42 int send_nak();
43 int send_ack();
44 void flush_recv_buffer();
45 int send_backlog();
46 void rotate_replog();
47 void write_replication_data(unsigned char, unsigned char, char *,
48  int, char *, int, int);
49 void write_repl_data(unsigned char, unsigned char, char *,
50  int, char *, int, int);
51 void merge_replog();
REPLICATIONMSG::vsize
int vsize
Definition: lib_repl.h:8
send_ack
int send_ack()
Definition: lib_repl.c:906
replication_worker
void * replication_worker(void *)
Definition: lib_repl.c:580
send_nak
int send_nak()
Definition: lib_repl.c:889
rotate_replog
void rotate_replog()
Definition: lib_repl.c:355
REPLICATIONMSG
Definition: lib_repl.h:2
send_backlog
int send_backlog()
Definition: lib_repl.c:186
REPLICATIONMSG::key
unsigned char * key
Definition: lib_repl.h:5
write_repl_data
void write_repl_data(unsigned char, unsigned char, char *, int, char *, int, int)
Definition: lib_repl.c:450
REPLICATIONMSG::crc32
int crc32
Definition: lib_repl.h:9
REPLICATIONMSG::database
unsigned char database
Definition: lib_repl.h:3
reconnect
int reconnect()
Definition: lib_repl.c:478
write_replication_data
void write_replication_data(unsigned char, unsigned char, char *, int, char *, int, int)
Definition: lib_repl.c:397
flush_recv_buffer
void flush_recv_buffer()
Definition: lib_repl.c:501
process_message
void process_message(char *, int)
Definition: lib_repl.c:727
REPLICATIONMSG::value
unsigned char * value
Definition: lib_repl.h:7
REPLICATIONMSG::ksize
int ksize
Definition: lib_repl.h:6
merge_replog
void merge_replog()
Definition: lib_repl.c:106
REPLICATIONMSG::operation
unsigned char operation
Definition: lib_repl.h:4