blob: 3210fab9ca8e9c9070d2786eedccdb81a9538898 [file] [log] [blame]
Steve Kondik2111ad72013-07-07 12:07:44 -07001/*
2 * param.h - Parameter values for ntfs-3g
3 *
4 * Copyright (c) 2009-2010 Jean-Pierre Andre
5 *
6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program/include file is distributed in the hope that it will be
12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program (in the main directory of the NTFS-3G
18 * distribution in the file COPYING); if not, write to the Free Software
19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef _NTFS_PARAM_H
23#define _NTFS_PARAM_H
24
25#define CACHE_INODE_SIZE 32 /* inode cache, zero or >= 3 and not too big */
26#define CACHE_NIDATA_SIZE 64 /* idata cache, zero or >= 3 and not too big */
27#define CACHE_LOOKUP_SIZE 64 /* lookup cache, zero or >= 3 and not too big */
28#define CACHE_SECURID_SIZE 16 /* securid cache, zero or >= 3 and not too big */
29#define CACHE_LEGACY_SIZE 8 /* legacy cache size, zero or >= 3 and not too big */
30
31#define FORCE_FORMAT_v1x 0 /* Insert security data as in NTFS v1.x */
32#define OWNERFROMACL 1 /* Get the owner from ACL (not Windows owner) */
33
34 /* default security sub-authorities */
35enum {
36 DEFSECAUTH1 = -1153374643, /* 3141592653 */
37 DEFSECAUTH2 = 589793238,
38 DEFSECAUTH3 = 462843383,
39 DEFSECBASE = 10000
40};
41
42/*
43 * Parameters for compression
44 */
45
46 /* default option for compression */
47#define DEFAULT_COMPRESSION 1
48 /* (log2 of) number of clusters in a compression block for new files */
49#define STANDARD_COMPRESSION_UNIT 4
50 /* maximum cluster size for allowing compression for new files */
51#define MAX_COMPRESSION_CLUSTER_SIZE 4096
52
53/*
54 * Parameters for default options
55 */
56
57#define DEFAULT_DMTIME 60 /* default 1mn for delay_mtime */
58
59/*
60 * Use of big write buffers
61 *
62 * With small volumes, the cluster allocator may fail to allocate
63 * enough clusters when the volume is nearly full. At most a run
64 * can be allocated per bitmap chunk. So, there is a danger when the
65 * number of chunks (capacity/(32768*clsiz)) is less than the number
66 * of clusters in the biggest write buffer (131072/clsiz). Hence
67 * a safe minimal capacity is 4GB
68 */
69
70#define SAFE_CAPACITY_FOR_BIG_WRITES 0x100000000LL
71
72/*
73 * Parameters for runlists
74 */
75
76 /* only update the final extent of a runlist when appending data */
77#define PARTIAL_RUNLIST_UPDATING 1
78
79/*
Steve Kondike68cb602016-08-28 00:45:36 -070080 * Parameters for upper-case table
81 */
82
83 /* Create upper-case tables as defined by Windows 6.1 (Win7) */
84#define UPCASE_MAJOR 6
85#define UPCASE_MINOR 1
86
87/*
Steve Kondik2111ad72013-07-07 12:07:44 -070088 * Parameters for user and xattr mappings
89 */
90
91#define XATTRMAPPINGFILE ".NTFS-3G/XattrMapping" /* default mapping file */
92
93/*
94 * Parameters for path canonicalization
95 */
96
97#define MAPPERNAMELTH 256
98
99/*
100 * Permission checking modes for high level and low level
101 *
102 * The choices for high and low lowel are independent, they have
103 * no effect on the library
104 *
105 * Stick to the recommended values unless you understand the consequences
106 * on protection and performances. Use of cacheing is good for
107 * performances, but bad on security with internal fuse or external
108 * fuse older than 2.8
109 *
110 * Possible values for high level :
111 * 1 : no cache, kernel control (recommended)
112 * 4 : no cache, file system control
Steve Kondike68cb602016-08-28 00:45:36 -0700113 * 6 : kernel/fuse cache, file system control (OpenIndiana only)
Steve Kondik2111ad72013-07-07 12:07:44 -0700114 * 7 : no cache, kernel control for ACLs
115 *
116 * Possible values for low level :
117 * 2 : no cache, kernel control
118 * 3 : use kernel/fuse cache, kernel control (external fuse >= 2.8)
Steve Kondike68cb602016-08-28 00:45:36 -0700119 * 5 : no cache, file system control (recommended on Linux)
120 * 6 : kernel/fuse cache, file system control (OpenIndiana only)
Steve Kondik2111ad72013-07-07 12:07:44 -0700121 * 8 : no cache, kernel control for ACLs
122 *
123 * Use of options 7 and 8 requires a patch to fuse
124 * When Posix ACLs are selected in the configure options, a value
125 * of 6 is added in the mount report.
126 */
127
128#if defined(__sun) && defined(__SVR4)
Steve Kondike68cb602016-08-28 00:45:36 -0700129/*
130 * Access control by kernel is not implemented on OpenIndiana,
131 * however care is taken of cacheing hard-linked files.
132 */
133#define HPERMSCONFIG 6
134#define LPERMSCONFIG 6
Steve Kondik2111ad72013-07-07 12:07:44 -0700135#else
136#define HPERMSCONFIG 1
Steve Kondik2111ad72013-07-07 12:07:44 -0700137#if defined(FUSE_INTERNAL) || !defined(FUSE_VERSION) || (FUSE_VERSION < 28)
138#define LPERMSCONFIG 5
139#else
140#define LPERMSCONFIG 3
141#endif
Steve Kondike68cb602016-08-28 00:45:36 -0700142#endif /* defined(__sun) && defined(__SVR4) */
Steve Kondik2111ad72013-07-07 12:07:44 -0700143
144#endif /* defined _NTFS_PARAM_H */