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