Blame view

configuration.h 2.26 KB
redmine authored
1 2 3


#ifndef BUFSIZ
redmine authored
4
#define BUFSIZ				(1<<16)
redmine authored
5 6
#endif

redmine authored
7
// don't do to much rules, it will degrade performance
redmine authored
8
#define MAXRULES			(1<<8)
redmine authored
9 10

// there's no need in more than 256 arguments while running action-script, IMHO :)
redmine authored
11
#define MAXARGUMENTS			(1<<8)
redmine authored
12 13 14

// clsync should be used, if there's more than 5-10 nodes. So the limit in 255 is quite enough. :)
#define MAXNODES			((1<<8)-1)
redmine authored
15

redmine authored
16 17 18 19 20 21 22
// max user/group lengths
#define USER_LEN			(1<<8)
#define GROUP_LEN			USER_LEN

// control socket listen backlog (man 2 listen)
#define SOCKET_BACKLOG			2

redmine authored
23 24 25 26 27
// control socket connections limit in clsync
#define SOCKET_MAX_CLSYNC		8

// control socket connections limit in libclsync
#define SOCKET_MAX_LIBCLSYNC		(1<<16)
redmine authored
28

redmine authored
29
// children count limit
redmine authored
30 31
#define MAXCHILDREN			(1<<8)

redmine authored
32
#define DEFAULT_RULES_PERM		RA_ALL
redmine authored
33 34
#define DEFAULT_NOTIFYENGINE		NE_INOTIFY
#define DEFAULT_COLLECTDELAY		30
redmine authored
35
#define DEFAULT_SYNCDELAY		(DEFAULT_COLLECTDELAY)
redmine authored
36 37 38
#define DEFAULT_BFILETHRESHOLD		(128 * 1024 * 1024)
#define DEFAULT_BFILECOLLECTDELAY	1800
#define DEFAULT_LABEL			"nolabel"
redmine authored
39
#define DEFAULT_RSYNCINCLUDELINESLIMIT	20000
redmine authored
40
#define DEFAULT_SYNCTIMEOUT		(3600 * 24)
redmine authored
41
#define DEFAULT_CLUSTERTIMEOUT		1000
redmine authored
42 43
#define DEFAULT_CLUSTERIPADDR		"227.108.115.121"
#define DEFAULT_CLUSTERIPPORT		40079
redmine authored
44 45 46
#define DEFAULT_CLUSTERHDLMIN		1
#define DEFAULT_CLUSTERHDLMAX		16
#define DEFAULT_CLUSTERSDLMAX		32
redmine authored
47
#define DEFAULT_CONFIG_BLOCK		"default"
redmine authored
48
#define DEFAULT_RETRIES			1
redmine authored
49
#define DEFAULT_VERBOSE			3
redmine authored
50

redmine authored
51 52
#define FANOTIFY_FLAGS			(FAN_CLOEXEC|FAN_UNLIMITED_QUEUE|FAN_UNLIMITED_MARKS)
#define FANOTIFY_EVFLAGS		(O_LARGEFILE|O_RDONLY|O_CLOEXEC)
redmine authored
53

redmine authored
54
#define FANOTIFY_MARKMASK		(FAN_OPEN|FAN_MODIFY|FAN_CLOSE|FAN_ONDIR|FAN_EVENT_ON_CHILD)
redmine authored
55

redmine authored
56 57
#define INOTIFY_FLAGS			0
					//(FD_CLOEXEC)
redmine authored
58

redmine authored
59
#define INOTIFY_MARKMASK		(IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MODIFY|IN_DONT_FOLLOW)
redmine authored
60

redmine authored
61
#define COUNTER_LIMIT			(1<<10)
redmine authored
62 63

#define SLEEP_SECONDS			1
redmine authored
64 65 66

#define KILL_TIMEOUT			60

redmine authored
67 68 69
#define ALLOC_PORTION			(1<<10) /* 1  KiX */
#define CLUSTER_WINDOW_BUFSIZE_PORTION	(1<<20) /* 1  MiB */
#define CLUSTER_PACKET_MAXSIZE		(1<<24) /* 16 MiB */
redmine authored
70

Andrew Savchenko authored
71
#define CONFIG_PATHS 			{ ".clsync.conf", "/etc/clsync/clsync.conf", NULL } /* "~/.clsync.conf" and "/etc/clsync/clsync.conf" */
redmine authored
72

redmine authored
73
#define API_PREFIX			"clsyncapi_"
redmine authored
74 75

#define DUMP_DIRMODE			0700