PageRenderTime 17ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/10.5/fusefs/common/fuse_param.h

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