/core/10.4/fusefs/common/fuse_param.h
C++ Header | 137 lines | 68 code | 33 blank | 36 comment | 0 complexity | 5d85108286840f7e00755449d762716b MD5 | raw file
1/* 2 * Copyright (C) 2006-2008 Google. All Rights Reserved. 3 * Amit Singh <singh@> 4 */ 5 6#ifndef _FUSE_PARAM_H_ 7#define _FUSE_PARAM_H_ 8 9/* Compile-time tunables (M_MACFUSE*) */ 10 11#define M_MACFUSE_ENABLE_FIFOFS 0 12#define M_MACFUSE_ENABLE_INTERRUPT 1 13#define M_MACFUSE_ENABLE_SPECFS 0 14#define M_MACFUSE_ENABLE_TSLOCKING 0 15#define M_MACFUSE_ENABLE_UNSUPPORTED 1 16#define M_MACFUSE_ENABLE_XATTR 1 17 18#if M_MACFUSE_ENABLE_UNSUPPORTED 19 #define M_MACFUSE_ENABLE_DSELECT 0 20 #define M_MACFUSE_ENABLE_EXCHANGE 1 21 #define M_MACFUSE_ENABLE_KQUEUE 1 22 #define M_MACFUSE_ENABLE_KUNC 1 23 #define M_MACFUSE_ENABLE_LOCKLOCAL 1 24#endif 25 26/* User Control */ 27 28#define MACFUSE_POSTUNMOUNT_SIGNAL SIGKILL 29 30#define MACOSX_ADMIN_GROUP_NAME "admin" 31 32#define SYSCTL_MACFUSE_TUNABLES_ADMIN "macfuse.tunables.admin_group" 33#define SYSCTL_MACFUSE_VERSION_NUMBER "macfuse.version.number" 34 35/* Paths */ 36 37#define MACFUSE_BUNDLE_PATH "/System/Library/Filesystems/fusefs.fs" 38#define MACFUSE_KEXT MACFUSE_BUNDLE_PATH "/Support/fusefs.kext" 39#define MACFUSE_LOAD_PROG MACFUSE_BUNDLE_PATH "/Support/load_fusefs" 40#define MACFUSE_MOUNT_PROG MACFUSE_BUNDLE_PATH "/Support/mount_fusefs" 41#define SYSTEM_KEXTLOAD "/sbin/kextload" 42#define SYSTEM_KEXTUNLOAD "/sbin/kextunload" 43 44/* Compatible API version */ 45 46#define MACFUSE_MIN_USER_VERSION_MAJOR 7 47#define MACFUSE_MIN_USER_VERSION_MINOR 5 48 49/* Device Interface */ 50 51/* 52 * This is the prefix ("fuse" by default) of the name of a FUSE device node 53 * in devfs. The suffix is the device number. "/dev/fuse0" is the first FUSE 54 * device by default. If you change the prefix from the default to something 55 * else, the user-space FUSE library will need to know about it too. 56 */ 57#define MACFUSE_DEVICE_BASENAME "fuse" 58 59/* 60 * This is the number of /dev/fuse<n> nodes we will create. <n> goes from 61 * 0 to (FUSE_NDEVICES - 1). 62 */ 63#define MACFUSE_NDEVICES 24 64 65/* 66 * This is the default block size of the virtual storage devices that are 67 * implicitly implemented by the FUSE kernel extension. This can be changed 68 * on a per-mount basis (there's one such virtual device for each mount). 69 */ 70#define FUSE_DEFAULT_BLOCKSIZE 4096 71 72#define FUSE_MIN_BLOCKSIZE 512 73#define FUSE_MAX_BLOCKSIZE MAXPHYS 74 75#ifndef MAX_UPL_TRANSFER 76#define MAX_UPL_TRANSFER 256 77#endif 78 79/* 80 * This is default I/O size used while accessing the virtual storage devices. 81 * This can be changed on a per-mount basis. 82 * 83 * Nevertheless, the I/O size must be at least as big as the block size. 84 */ 85#define FUSE_DEFAULT_IOSIZE (16 * PAGE_SIZE) 86 87#define FUSE_MIN_IOSIZE 512 88#define FUSE_MAX_IOSIZE (MAX_UPL_TRANSFER * PAGE_SIZE) 89 90#define FUSE_DEFAULT_INIT_TIMEOUT 10 /* s */ 91#define FUSE_MIN_INIT_TIMEOUT 1 /* s */ 92#define FUSE_MAX_INIT_TIMEOUT 300 /* s */ 93#define FUSE_INIT_WAIT_INTERVAL 100000 /* us */ 94 95#define FUSE_INIT_TIMEOUT_DEFAULT_BUTTON_TITLE "OK" 96#define FUSE_INIT_TIMEOUT_NOTICE_MESSAGE \ 97 "Timed out waiting for the file system to initialize. The volume has " \ 98 "been ejected. You can use the init_timeout mount option to wait longer." 99 100#define FUSE_DEFAULT_DAEMON_TIMEOUT 30 /* s */ 101#define FUSE_MIN_DAEMON_TIMEOUT 0 /* s */ 102#define FUSE_MAX_DAEMON_TIMEOUT 600 /* s */ 103 104#define FUSE_DAEMON_TIMEOUT_DEFAULT_BUTTON_TITLE "Keep Trying" 105#define FUSE_DAEMON_TIMEOUT_OTHER_BUTTON_TITLE "Force Eject" 106#define FUSE_DAEMON_TIMEOUT_ALTERNATE_BUTTON_TITLE "Don't Warn Again" 107#define FUSE_DAEMON_TIMEOUT_ALERT_MESSAGE \ 108 "There was a timeout waiting for the file system to respond. You can " \ 109 "eject this volume immediately, but unsaved changes may be lost." 110#define FUSE_DAEMON_TIMEOUT_ALERT_TIMEOUT 120 /* s */ 111 112#ifdef KERNEL 113 114/* 115 * This is the soft upper limit on the number of "request tickets" FUSE's 116 * user-kernel IPC layer can have for a given mount. This can be modified 117 * through the fuse.* sysctl interface. 118 */ 119#define FUSE_DEFAULT_MAX_FREE_TICKETS 1024 120#define FUSE_DEFAULT_IOV_PERMANENT_BUFSIZE (1 << 19) 121#define FUSE_DEFAULT_IOV_CREDIT 16 122 123/* User-Kernel IPC Buffer */ 124 125#define FUSE_MIN_USERKERNEL_BUFSIZE (128 * 1024) 126#define FUSE_MAX_USERKERNEL_BUFSIZE (4096 * 1024) 127 128#define FUSE_REASONABLE_XATTRSIZE FUSE_MIN_USERKERNEL_BUFSIZE 129 130#endif /* KERNEL */ 131 132#define FUSE_DEFAULT_USERKERNEL_BUFSIZE (4096 * 1024) 133 134#define FUSE_LINK_MAX LINK_MAX 135#define FUSE_UIO_BACKUP_MAX 8 136 137#endif /* _FUSE_PARAM_H_ */