/core/10.4/fusefs/common/fuse_param.h

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