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.c File Reference
#include "lib_log.h"
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <time.h>
#include <fuse.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/file.h>
#include <tcutil.h>
#include <tcbdb.h>
#include <tchdb.h>
#include <stdbool.h>
#include <stdint.h>
#include <aio.h>
#include <mhash.h>
#include <mutils/mhash.h>
#include <dirent.h>
#include "lib_safe.h"
#include "lib_cfg.h"
#include "lib_net.h"
#include "retcodes.h"
#include "lib_qlz.h"
#include "lib_common.h"
#include "lib_repl.h"
#include "lib_crypto.h"
#include "file_io.h"
#include "lib_tc.h"
Include dependency graph for lib_repl.c:

Go to the source code of this file.

Functions

unsigned char * crc32 (unsigned char *buf, int size, int thread_number)
 
int check_abort ()
 
void merge_replog ()
 
int send_backlog ()
 
void rotate_replog ()
 
void write_replication_data (unsigned char db, unsigned char op, char *key, int ksize, char *value, int vsize, int threadnr)
 
void write_repl_data (unsigned char db, unsigned char op, char *key, int ksize, char *value, int vsize, int threadnr)
 
int reconnect ()
 
void flush_recv_buffer ()
 
void watchdir ()
 
void * replication_worker (void *arg)
 
void process_message (char *message, int msglen)
 
int send_nak ()
 
int send_ack ()
 

Variables

TCHDB * dbb
 
TCHDB * dbu
 
TCHDB * dbp
 
TCBDB * dbl
 
TCHDB * dbs
 
TCHDB * dbdta
 
TCBDB * dbdirent
 
TCBDB * freelist
 
TCTREE * workqtree
 
TCTREE * readcachetree
 
TCTREE * path2inotree
 
int fdbdta
 
int frepl
 
int freplbl
 
int rrepl
 
int BLKSIZE
 
unsigned long long nextoffset
 

Function Documentation

◆ check_abort()

int check_abort ( )

◆ crc32()

unsigned char* crc32 ( unsigned char *  buf,
int  size,
int  thread_number 
)

Definition at line 82 of file lib_repl.c.

References MAX_ALLOWED_THREADS.

Referenced by merge_replog(), replication_worker(), and write_replication_data().

◆ flush_recv_buffer()

void flush_recv_buffer ( )

Definition at line 501 of file lib_repl.c.

References config, fulltimRead(), and configdata::replication_socket.

Referenced by send_nak().

◆ merge_replog()

◆ process_message()

◆ reconnect()

◆ replication_worker()

◆ rotate_replog()

◆ send_ack()

int send_ack ( )

Definition at line 906 of file lib_repl.c.

References ACK, config, EFUNC, fulltimWrite(), FUNC, and configdata::replication_socket.

Referenced by replication_worker().

◆ send_backlog()

◆ send_nak()

int send_nak ( )

Definition at line 889 of file lib_repl.c.

References config, EFUNC, flush_recv_buffer(), fulltimWrite(), FUNC, NAK, and configdata::replication_socket.

Referenced by replication_worker().

◆ watchdir()

◆ write_repl_data()

void write_repl_data ( unsigned char  db,
unsigned char  op,
char *  key,
int  ksize,
char *  value,
int  vsize,
int  threadnr 
)

◆ write_replication_data()

void write_replication_data ( unsigned char  db,
unsigned char  op,
char *  key,
int  ksize,
char *  value,
int  vsize,
int  threadnr 
)

Variable Documentation

◆ BLKSIZE

int BLKSIZE

Definition at line 8 of file commons.h.

Referenced by merge_replog(), replication_worker(), and send_backlog().

◆ dbb

◆ dbdirent

◆ dbdta

◆ dbl

◆ dbp

◆ dbs

◆ dbu

◆ fdbdta

int fdbdta

Definition at line 92 of file lib_tc.c.

Referenced by process_message().

◆ freelist

◆ frepl

int frepl

Definition at line 93 of file lib_tc.c.

Referenced by rotate_replog(), write_repl_data(), and write_replication_data().

◆ freplbl

int freplbl

Definition at line 94 of file lib_tc.c.

Referenced by rotate_replog(), and send_backlog().

◆ nextoffset

unsigned long long nextoffset

Definition at line 90 of file lib_common.c.

Referenced by process_message().

◆ path2inotree

TCTREE* path2inotree

Definition at line 110 of file lib_common.c.

Referenced by process_message().

◆ readcachetree

TCTREE* readcachetree

Definition at line 109 of file lib_common.c.

◆ rrepl

int rrepl

Definition at line 78 of file lib_repl.c.

Referenced by create_report(), main(), merge_replog(), and watchdir().

◆ workqtree

TCTREE* workqtree

Definition at line 108 of file lib_common.c.