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_cfg.h
Go to the documentation of this file.
1 /*
2  * Lessfs: A data deduplicating filesystem.
3  * Copyright (C) 2008 Mark Ruijter <mruijter@lessfs.com>
4  *
5  * This program is free software.
6  * You can redistribute lessfs and/or modify it under the terms of either
7  * (1) the GNU General Public License; either version 3 of the License,
8  * or (at your option) any later version as published by
9  * the Free Software Foundation; or (2) obtain a commercial license
10  * by contacting the Author.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15  * the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */
21 
22 #define USEC_MAX 1000000
23 
24 struct configdata {
25  char *blockdata;
26  char *blockdatabs;
28  char *blockusage;
29  char *blockusagebs;
30  char *dirent;
31  char *direntbs;
32  char *fileblock;
33  char *fileblockbs;
34  char *meta;
35  char *metabs;
36  char *hardlink;
37  char *hardlinkbs;
38  char *symlink;
39  char *symlinkbs;
40  char *freelist;
41  char *freelistbs;
42  char *nexthash;
46  unsigned char *commithash;
47  char *hash;
48  char *lfsstats;
49  unsigned char compression;
50  unsigned char *iv;
51  unsigned char *passwd;
52  unsigned long long cachesize;
53  unsigned int flushtime;
54  unsigned int inspectdiskinterval;
55  unsigned int defrag;
56  unsigned int relax;
57  unsigned int encryptdata;
58  unsigned int encryptmeta;
59  unsigned int selected_hash;
60  int hashlen;
63  int replication_role; // 0=master, 1=slave
72  unsigned long rotate_replog_size;
73 // Set stickybit on the file during truncation to indicate that
74 // it's locked.
76  int shutdown;
77  int frozen;
78  int safe_down;
80  int nospace;
82  int reclaim;
83  int tune_for_size; // 0 <=1TB 1<=10TB 2 >10TB
85  unsigned long hamsterdb_cachesize;
86  unsigned long max_backlog_size;
87 // Sleep utime in the truncation loop.
88 // Counter is increase by normal ops, decreased by truncation.
89 // (background) Truncation will therefore become slower when other tasks are running.
90 };
92 
93 int read_s_cfg(char *cfgfile, char *value, int size);
94 int read_m_cfg(char *cfgfile, char *value, char *value2, int size);
95 int r_env_cfg(char *configfile);
96 char *read_val(char *token);
read_s_cfg
int read_s_cfg(char *cfgfile, char *value, int size)
configdata::replication_socket
int replication_socket
Definition: lib_cfg.h:64
configdata::replication_partner_port
char * replication_partner_port
Definition: lib_cfg.h:66
configdata::tuneforspeed
int tuneforspeed
Definition: lib_cfg.h:79
configdata::freelist
char * freelist
Definition: lib_cfg.h:40
configdata::background_delete
int background_delete
Definition: lib_cfg.h:69
configdata::freelistbs
char * freelistbs
Definition: lib_cfg.h:41
configdata::encryptmeta
unsigned int encryptmeta
Definition: lib_cfg.h:58
configdata::replication
int replication
Definition: lib_cfg.h:62
configdata::hamsterdb_cachesize
unsigned long hamsterdb_cachesize
Definition: lib_cfg.h:85
configdata::replication_backlog
int replication_backlog
Definition: lib_cfg.h:71
configdata::direntbs
char * direntbs
Definition: lib_cfg.h:31
configdata::passwd
unsigned char * passwd
Definition: lib_cfg.h:51
configdata::fileblockbs
char * fileblockbs
Definition: lib_cfg.h:33
configdata::lfsstats
char * lfsstats
Definition: lib_cfg.h:48
configdata::blockusagebs
char * blockusagebs
Definition: lib_cfg.h:29
configdata::selected_hash
unsigned int selected_hash
Definition: lib_cfg.h:59
configdata::fileblock
char * fileblock
Definition: lib_cfg.h:32
configdata::replication_listen_ip
char * replication_listen_ip
Definition: lib_cfg.h:67
configdata::shutdown
int shutdown
Definition: lib_cfg.h:76
configdata::replication_partner_ip
char * replication_partner_ip
Definition: lib_cfg.h:65
configdata::commithash
unsigned char * commithash
Definition: lib_cfg.h:46
configdata::rotate_replog_size
unsigned long rotate_replog_size
Definition: lib_cfg.h:72
configdata::nexthash
char * nexthash
Definition: lib_cfg.h:42
configdata::reclaim
int reclaim
Definition: lib_cfg.h:82
configdata::defrag
unsigned int defrag
Definition: lib_cfg.h:55
configdata::blockdata
char * blockdata
Definition: lib_cfg.h:25
configdata::tune_for_size
int tune_for_size
Definition: lib_cfg.h:83
configdata::safe_down
int safe_down
Definition: lib_cfg.h:78
configdata::meta
char * meta
Definition: lib_cfg.h:34
configdata::nospace
int nospace
Definition: lib_cfg.h:80
configdata::flushtime
unsigned int flushtime
Definition: lib_cfg.h:53
config
struct configdata * config
Definition: lib_cfg.h:91
configdata::blockdata_io_type
int blockdata_io_type
Definition: lib_cfg.h:27
configdata::encryptdata
unsigned int encryptdata
Definition: lib_cfg.h:57
configdata::replication_watchdir
char * replication_watchdir
Definition: lib_cfg.h:44
configdata::metabs
char * metabs
Definition: lib_cfg.h:35
configdata::transactions
int transactions
Definition: lib_cfg.h:61
configdata::max_backlog_size
unsigned long max_backlog_size
Definition: lib_cfg.h:86
configdata::hardlink
char * hardlink
Definition: lib_cfg.h:36
read_val
char * read_val(char *token)
Definition: lib_cfg.c:76
configdata::compression
unsigned char compression
Definition: lib_cfg.h:49
configdata::replication_last_rotated
time_t replication_last_rotated
Definition: lib_cfg.h:45
r_env_cfg
int r_env_cfg(char *configfile)
Definition: lib_cfg.c:37
configdata::frozen
int frozen
Definition: lib_cfg.h:77
configdata::sticky_on_locked
int sticky_on_locked
Definition: lib_cfg.h:75
configdata::hardlinkbs
char * hardlinkbs
Definition: lib_cfg.h:37
configdata::hashlen
int hashlen
Definition: lib_cfg.h:60
read_m_cfg
int read_m_cfg(char *cfgfile, char *value, char *value2, int size)
configdata::relax
unsigned int relax
Definition: lib_cfg.h:56
configdata::replication_listen_port
char * replication_listen_port
Definition: lib_cfg.h:68
configdata::iv
unsigned char * iv
Definition: lib_cfg.h:50
configdata::symlinkbs
char * symlinkbs
Definition: lib_cfg.h:39
configdata::replication_enabled
int replication_enabled
Definition: lib_cfg.h:70
configdata::bdb_private
int bdb_private
Definition: lib_cfg.h:84
configdata
Definition: lib_cfg.h:24
configdata::inspectdiskinterval
unsigned int inspectdiskinterval
Definition: lib_cfg.h:54
configdata::chunk_depth
int chunk_depth
Definition: lib_cfg.h:81
configdata::blockdatabs
char * blockdatabs
Definition: lib_cfg.h:26
configdata::symlink
char * symlink
Definition: lib_cfg.h:38
configdata::hash
char * hash
Definition: lib_cfg.h:47
configdata::replication_logfile
char * replication_logfile
Definition: lib_cfg.h:43
configdata::cachesize
unsigned long long cachesize
Definition: lib_cfg.h:52
configdata::dirent
char * dirent
Definition: lib_cfg.h:30
configdata::replication_role
int replication_role
Definition: lib_cfg.h:63
configdata::blockusage
char * blockusage
Definition: lib_cfg.h:28