Made use of fuse module cache on OpenIndiana

The fuse cache does not handle properly hard-linked files, so ntfs-3g
traditionally disables it by using a null time-out. With an upgrade of
the fuse kernel module on OpenIndiana, cacheing of non hard-linked files
is now possible, so use it.
pull/2/head
Jean-Pierre André 2015-09-30 08:36:37 +02:00
parent 5ebe36f10a
commit 9c2657b4ae
2 changed files with 18 additions and 7 deletions

View File

@ -110,12 +110,14 @@ enum {
* Possible values for high level :
* 1 : no cache, kernel control (recommended)
* 4 : no cache, file system control
* 6 : kernel/fuse cache, file system control (OpenIndiana only)
* 7 : no cache, kernel control for ACLs
*
* Possible values for low level :
* 2 : no cache, kernel control
* 3 : use kernel/fuse cache, kernel control (external fuse >= 2.8)
* 5 : no cache, file system control (recommended)
* 5 : no cache, file system control (recommended on Linux)
* 6 : kernel/fuse cache, file system control (OpenIndiana only)
* 8 : no cache, kernel control for ACLs
*
* Use of options 7 and 8 requires a patch to fuse
@ -124,14 +126,19 @@ enum {
*/
#if defined(__sun) && defined(__SVR4)
#define HPERMSCONFIG 4 /* access control by kernel is broken on OpenIndiana */
/*
* Access control by kernel is not implemented on OpenIndiana,
* however care is taken of cacheing hard-linked files.
*/
#define HPERMSCONFIG 6
#define LPERMSCONFIG 6
#else
#define HPERMSCONFIG 1
#endif
#if defined(FUSE_INTERNAL) || !defined(FUSE_VERSION) || (FUSE_VERSION < 28)
#define LPERMSCONFIG 5
#else
#define LPERMSCONFIG 3
#endif
#endif /* defined(__sun) && defined(__SVR4) */
#endif /* defined _NTFS_PARAM_H */

View File

@ -124,20 +124,24 @@
#error "Incompatible options KERNELACLS and KERNELPERMS"
#endif
#if CACHEING & (KERNELACLS | !KERNELPERMS)
#warning "Fuse cacheing is only usable with basic permissions checked by kernel"
#endif
#if !CACHEING
#define ATTR_TIMEOUT 0.0
#define ENTRY_TIMEOUT 0.0
#else
#if defined(__sun) && defined (__SVR4)
#define ATTR_TIMEOUT 10.0
#define ENTRY_TIMEOUT 10.0
#else /* defined(__sun) && defined (__SVR4) */
/*
* FUSE cacheing is only usable with basic permissions
* checked by the kernel with external fuse >= 2.8
*/
#if KERNELACLS | !KERNELPERMS
#warning "Fuse cacheing is only usable with basic permissions checked by kernel"
#endif
#define ATTR_TIMEOUT (ctx->vol->secure_flags & (1 << SECURITY_DEFAULT) ? 1.0 : 0.0)
#define ENTRY_TIMEOUT (ctx->vol->secure_flags & (1 << SECURITY_DEFAULT) ? 1.0 : 0.0)
#endif /* defined(__sun) && defined (__SVR4) */
#endif
#define GHOSTLTH 40 /* max length of a ghost file name - see ghostformat */