xref: /haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/param.h (revision 0d2c294fa19def5bc72f57f28f2f2c8c21a879dd)
1*0d2c294fSGerasim Troeglazov /*
2*0d2c294fSGerasim Troeglazov  * param.h - Parameter values for ntfs-3g
3*0d2c294fSGerasim Troeglazov  *
4*0d2c294fSGerasim Troeglazov  * Copyright (c) 2009      Jean-Pierre Andre
5*0d2c294fSGerasim Troeglazov  *
6*0d2c294fSGerasim Troeglazov  * This program/include file is free software; you can redistribute it and/or
7*0d2c294fSGerasim Troeglazov  * modify it under the terms of the GNU General Public License as published
8*0d2c294fSGerasim Troeglazov  * by the Free Software Foundation; either version 2 of the License, or
9*0d2c294fSGerasim Troeglazov  * (at your option) any later version.
10*0d2c294fSGerasim Troeglazov  *
11*0d2c294fSGerasim Troeglazov  * This program/include file is distributed in the hope that it will be
12*0d2c294fSGerasim Troeglazov  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13*0d2c294fSGerasim Troeglazov  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*0d2c294fSGerasim Troeglazov  * GNU General Public License for more details.
15*0d2c294fSGerasim Troeglazov  *
16*0d2c294fSGerasim Troeglazov  * You should have received a copy of the GNU General Public License
17*0d2c294fSGerasim Troeglazov  * along with this program (in the main directory of the NTFS-3G
18*0d2c294fSGerasim Troeglazov  * distribution in the file COPYING); if not, write to the Free Software
19*0d2c294fSGerasim Troeglazov  * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20*0d2c294fSGerasim Troeglazov  */
21*0d2c294fSGerasim Troeglazov 
22*0d2c294fSGerasim Troeglazov #ifndef _NTFS_PARAM_H
23*0d2c294fSGerasim Troeglazov #define _NTFS_PARAM_H
24*0d2c294fSGerasim Troeglazov 
25*0d2c294fSGerasim Troeglazov #define CACHE_INODE_SIZE 32	/* inode cache, zero or >= 3 and not too big */
26*0d2c294fSGerasim Troeglazov #define CACHE_NIDATA_SIZE 64	/* idata cache, zero or >= 3 and not too big */
27*0d2c294fSGerasim Troeglazov #define CACHE_LOOKUP_SIZE 64	/* lookup cache, zero or >= 3 and not too big */
28*0d2c294fSGerasim Troeglazov #define CACHE_SECURID_SIZE 16    /* securid cache, zero or >= 3 and not too big */
29*0d2c294fSGerasim Troeglazov #define CACHE_LEGACY_SIZE 8    /* legacy cache size, zero or >= 3 and not too big */
30*0d2c294fSGerasim Troeglazov 
31*0d2c294fSGerasim Troeglazov #define FORCE_FORMAT_v1x 0	/* Insert security data as in NTFS v1.x */
32*0d2c294fSGerasim Troeglazov #define OWNERFROMACL 1		/* Get the owner from ACL (not Windows owner) */
33*0d2c294fSGerasim Troeglazov 
34*0d2c294fSGerasim Troeglazov 		/* default security sub-authorities */
35*0d2c294fSGerasim Troeglazov enum {
36*0d2c294fSGerasim Troeglazov 	DEFSECAUTH1 = -1153374643, /* 3141592653 */
37*0d2c294fSGerasim Troeglazov 	DEFSECAUTH2 = 589793238,
38*0d2c294fSGerasim Troeglazov 	DEFSECAUTH3 = 462843383,
39*0d2c294fSGerasim Troeglazov 	DEFSECBASE = 10000
40*0d2c294fSGerasim Troeglazov };
41*0d2c294fSGerasim Troeglazov 
42*0d2c294fSGerasim Troeglazov /*
43*0d2c294fSGerasim Troeglazov  *		Parameters for compression
44*0d2c294fSGerasim Troeglazov  */
45*0d2c294fSGerasim Troeglazov 
46*0d2c294fSGerasim Troeglazov 	/* default option for compression */
47*0d2c294fSGerasim Troeglazov #define DEFAULT_COMPRESSION FALSE
48*0d2c294fSGerasim Troeglazov 	/* (log2 of) number of clusters in a compression block for new files */
49*0d2c294fSGerasim Troeglazov #define STANDARD_COMPRESSION_UNIT 4
50*0d2c294fSGerasim Troeglazov 	/* maximum cluster size for allowing compression for new files */
51*0d2c294fSGerasim Troeglazov #define MAX_COMPRESSION_CLUSTER_SIZE 4096
52*0d2c294fSGerasim Troeglazov 
53*0d2c294fSGerasim Troeglazov /*
54*0d2c294fSGerasim Troeglazov  *		Permission checking modes for high level and low level
55*0d2c294fSGerasim Troeglazov  *
56*0d2c294fSGerasim Troeglazov  *	The choices for high and low lowel are independent, they have
57*0d2c294fSGerasim Troeglazov  *	no effect on the library
58*0d2c294fSGerasim Troeglazov  *
59*0d2c294fSGerasim Troeglazov  *	Stick to the recommended values unless you understand the consequences
60*0d2c294fSGerasim Troeglazov  *	on protection and performances. Use of cacheing is good for
61*0d2c294fSGerasim Troeglazov  *	performances, but bad on security.
62*0d2c294fSGerasim Troeglazov  *
63*0d2c294fSGerasim Troeglazov  *	Possible values for high level :
64*0d2c294fSGerasim Troeglazov  *		1 : no cache, kernel control (recommended)
65*0d2c294fSGerasim Troeglazov  *		4 : no cache, file system control
66*0d2c294fSGerasim Troeglazov  *		7 : no cache, kernel control for ACLs
67*0d2c294fSGerasim Troeglazov  *
68*0d2c294fSGerasim Troeglazov  *	Possible values for low level :
69*0d2c294fSGerasim Troeglazov  *		2 : no cache, kernel control
70*0d2c294fSGerasim Troeglazov  *		3 : use kernel/fuse cache, kernel control
71*0d2c294fSGerasim Troeglazov  *		5 : no cache, file system control (recommended)
72*0d2c294fSGerasim Troeglazov  *		8 : no cache, kernel control for ACLs
73*0d2c294fSGerasim Troeglazov  *
74*0d2c294fSGerasim Troeglazov  *	Use of options 7 and 8 requires a patch to fuse
75*0d2c294fSGerasim Troeglazov  *	When Posix ACLs are selected in the configure options, a value
76*0d2c294fSGerasim Troeglazov  *	of 6 is added in the mount report.
77*0d2c294fSGerasim Troeglazov  */
78*0d2c294fSGerasim Troeglazov 
79*0d2c294fSGerasim Troeglazov #define HPERMSCONFIG 1
80*0d2c294fSGerasim Troeglazov #define LPERMSCONFIG 5
81*0d2c294fSGerasim Troeglazov 
82*0d2c294fSGerasim Troeglazov #endif /* defined _NTFS_PARAM_H */
83