10d2c294fSGerasim Troeglazov /* 20d2c294fSGerasim Troeglazov * param.h - Parameter values for ntfs-3g 30d2c294fSGerasim Troeglazov * 4a814d850Sthreedeyes * Copyright (c) 2009-2010 Jean-Pierre Andre 50d2c294fSGerasim Troeglazov * 60d2c294fSGerasim Troeglazov * This program/include file is free software; you can redistribute it and/or 70d2c294fSGerasim Troeglazov * modify it under the terms of the GNU General Public License as published 80d2c294fSGerasim Troeglazov * by the Free Software Foundation; either version 2 of the License, or 90d2c294fSGerasim Troeglazov * (at your option) any later version. 100d2c294fSGerasim Troeglazov * 110d2c294fSGerasim Troeglazov * This program/include file is distributed in the hope that it will be 120d2c294fSGerasim Troeglazov * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 130d2c294fSGerasim Troeglazov * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 140d2c294fSGerasim Troeglazov * GNU General Public License for more details. 150d2c294fSGerasim Troeglazov * 160d2c294fSGerasim Troeglazov * You should have received a copy of the GNU General Public License 170d2c294fSGerasim Troeglazov * along with this program (in the main directory of the NTFS-3G 180d2c294fSGerasim Troeglazov * distribution in the file COPYING); if not, write to the Free Software 190d2c294fSGerasim Troeglazov * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 200d2c294fSGerasim Troeglazov */ 210d2c294fSGerasim Troeglazov 220d2c294fSGerasim Troeglazov #ifndef _NTFS_PARAM_H 230d2c294fSGerasim Troeglazov #define _NTFS_PARAM_H 240d2c294fSGerasim Troeglazov 250d2c294fSGerasim Troeglazov #define CACHE_INODE_SIZE 32 /* inode cache, zero or >= 3 and not too big */ 260d2c294fSGerasim Troeglazov #define CACHE_NIDATA_SIZE 64 /* idata cache, zero or >= 3 and not too big */ 270d2c294fSGerasim Troeglazov #define CACHE_LOOKUP_SIZE 64 /* lookup cache, zero or >= 3 and not too big */ 280d2c294fSGerasim Troeglazov #define CACHE_SECURID_SIZE 16 /* securid cache, zero or >= 3 and not too big */ 290d2c294fSGerasim Troeglazov #define CACHE_LEGACY_SIZE 8 /* legacy cache size, zero or >= 3 and not too big */ 300d2c294fSGerasim Troeglazov 310d2c294fSGerasim Troeglazov #define FORCE_FORMAT_v1x 0 /* Insert security data as in NTFS v1.x */ 320d2c294fSGerasim Troeglazov #define OWNERFROMACL 1 /* Get the owner from ACL (not Windows owner) */ 330d2c294fSGerasim Troeglazov 340d2c294fSGerasim Troeglazov /* default security sub-authorities */ 350d2c294fSGerasim Troeglazov enum { 360d2c294fSGerasim Troeglazov DEFSECAUTH1 = -1153374643, /* 3141592653 */ 370d2c294fSGerasim Troeglazov DEFSECAUTH2 = 589793238, 380d2c294fSGerasim Troeglazov DEFSECAUTH3 = 462843383, 390d2c294fSGerasim Troeglazov DEFSECBASE = 10000 400d2c294fSGerasim Troeglazov }; 410d2c294fSGerasim Troeglazov 420d2c294fSGerasim Troeglazov /* 430d2c294fSGerasim Troeglazov * Parameters for compression 440d2c294fSGerasim Troeglazov */ 450d2c294fSGerasim Troeglazov 460d2c294fSGerasim Troeglazov /* default option for compression */ 47a814d850Sthreedeyes #define DEFAULT_COMPRESSION 1 480d2c294fSGerasim Troeglazov /* (log2 of) number of clusters in a compression block for new files */ 490d2c294fSGerasim Troeglazov #define STANDARD_COMPRESSION_UNIT 4 500d2c294fSGerasim Troeglazov /* maximum cluster size for allowing compression for new files */ 510d2c294fSGerasim Troeglazov #define MAX_COMPRESSION_CLUSTER_SIZE 4096 520d2c294fSGerasim Troeglazov 530d2c294fSGerasim Troeglazov /* 54*da0906f2SGerasim Troeglazov * Parameters for default options 55*da0906f2SGerasim Troeglazov */ 56*da0906f2SGerasim Troeglazov 57*da0906f2SGerasim Troeglazov #define DEFAULT_DMTIME 60 /* default 1mn for delay_mtime */ 58*da0906f2SGerasim Troeglazov 59*da0906f2SGerasim Troeglazov /* 60a814d850Sthreedeyes * Use of big write buffers 61a814d850Sthreedeyes * 62a814d850Sthreedeyes * With small volumes, the cluster allocator may fail to allocate 63a814d850Sthreedeyes * enough clusters when the volume is nearly full. At most a run 64a814d850Sthreedeyes * can be allocated per bitmap chunk. So, there is a danger when the 65a814d850Sthreedeyes * number of chunks (capacity/(32768*clsiz)) is less than the number 66a814d850Sthreedeyes * of clusters in the biggest write buffer (131072/clsiz). Hence 67a814d850Sthreedeyes * a safe minimal capacity is 4GB 68a814d850Sthreedeyes */ 69a814d850Sthreedeyes 70a814d850Sthreedeyes #define SAFE_CAPACITY_FOR_BIG_WRITES 0x100000000LL 71a814d850Sthreedeyes 72a814d850Sthreedeyes /* 73a814d850Sthreedeyes * Parameters for runlists 74a814d850Sthreedeyes */ 75a814d850Sthreedeyes 76a814d850Sthreedeyes /* only update the final extent of a runlist when appending data */ 77a814d850Sthreedeyes #define PARTIAL_RUNLIST_UPDATING 1 78a814d850Sthreedeyes 79a814d850Sthreedeyes /* 80a814d850Sthreedeyes * Parameters for user and xattr mappings 81a814d850Sthreedeyes */ 82a814d850Sthreedeyes 83a814d850Sthreedeyes #define XATTRMAPPINGFILE ".NTFS-3G/XattrMapping" /* default mapping file */ 84a814d850Sthreedeyes 85a814d850Sthreedeyes /* 86a814d850Sthreedeyes * Parameters for path canonicalization 87a814d850Sthreedeyes */ 88a814d850Sthreedeyes 89a814d850Sthreedeyes #define MAPPERNAMELTH 256 90a814d850Sthreedeyes 91a814d850Sthreedeyes /* 920d2c294fSGerasim Troeglazov * Permission checking modes for high level and low level 930d2c294fSGerasim Troeglazov * 940d2c294fSGerasim Troeglazov * The choices for high and low lowel are independent, they have 950d2c294fSGerasim Troeglazov * no effect on the library 960d2c294fSGerasim Troeglazov * 970d2c294fSGerasim Troeglazov * Stick to the recommended values unless you understand the consequences 980d2c294fSGerasim Troeglazov * on protection and performances. Use of cacheing is good for 99a814d850Sthreedeyes * performances, but bad on security with internal fuse or external 100a814d850Sthreedeyes * fuse older than 2.8 1010d2c294fSGerasim Troeglazov * 1020d2c294fSGerasim Troeglazov * Possible values for high level : 1030d2c294fSGerasim Troeglazov * 1 : no cache, kernel control (recommended) 1040d2c294fSGerasim Troeglazov * 4 : no cache, file system control 1050d2c294fSGerasim Troeglazov * 7 : no cache, kernel control for ACLs 1060d2c294fSGerasim Troeglazov * 1070d2c294fSGerasim Troeglazov * Possible values for low level : 1080d2c294fSGerasim Troeglazov * 2 : no cache, kernel control 109a814d850Sthreedeyes * 3 : use kernel/fuse cache, kernel control (external fuse >= 2.8) 1100d2c294fSGerasim Troeglazov * 5 : no cache, file system control (recommended) 1110d2c294fSGerasim Troeglazov * 8 : no cache, kernel control for ACLs 1120d2c294fSGerasim Troeglazov * 1130d2c294fSGerasim Troeglazov * Use of options 7 and 8 requires a patch to fuse 1140d2c294fSGerasim Troeglazov * When Posix ACLs are selected in the configure options, a value 1150d2c294fSGerasim Troeglazov * of 6 is added in the mount report. 1160d2c294fSGerasim Troeglazov */ 1170d2c294fSGerasim Troeglazov 118*da0906f2SGerasim Troeglazov #if defined(__sun) && defined(__SVR4) 119*da0906f2SGerasim Troeglazov #define HPERMSCONFIG 4 /* access control by kernel is broken on OpenIndiana */ 120*da0906f2SGerasim Troeglazov #else 1210d2c294fSGerasim Troeglazov #define HPERMSCONFIG 1 122*da0906f2SGerasim Troeglazov #endif 123a814d850Sthreedeyes #if defined(FUSE_INTERNAL) || !defined(FUSE_VERSION) || (FUSE_VERSION < 28) 1240d2c294fSGerasim Troeglazov #define LPERMSCONFIG 5 125a814d850Sthreedeyes #else 126a814d850Sthreedeyes #define LPERMSCONFIG 3 127a814d850Sthreedeyes #endif 1280d2c294fSGerasim Troeglazov 1290d2c294fSGerasim Troeglazov #endif /* defined _NTFS_PARAM_H */ 130