From 887d8f8294eb5c1437a1ae0a29ecc7878a536d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Wed, 6 Apr 2016 09:44:59 +0200 Subject: [PATCH] Allowed kernel cacheing by lowntfs-3g when not using Posix ACLs Kernel cacheing of file attributes is usually not used by ntfs-3g, because it has defects when dealing with hard linked files and directory permission checks. Kernel cacheing is however possible when using lowntfs-3g and not using Posix ACLs. --- include/ntfs-3g/param.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/ntfs-3g/param.h b/include/ntfs-3g/param.h index 3210fab9..0b32cf80 100644 --- a/include/ntfs-3g/param.h +++ b/include/ntfs-3g/param.h @@ -115,8 +115,8 @@ enum { * * 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 on Linux) + * 3 : use kernel/fuse cache, kernel control (recommended) + * 5 : no cache, file system control * 6 : kernel/fuse cache, file system control (OpenIndiana only) * 8 : no cache, kernel control for ACLs * @@ -132,13 +132,14 @@ enum { */ #define HPERMSCONFIG 6 #define LPERMSCONFIG 6 -#else +#else /* defined(__sun) && defined(__SVR4) */ +/* + * Cacheing by kernel is buggy on Linux when access control is done + * by the file system, and also when using hard-linked files on + * the fuse high level interface. + */ #define HPERMSCONFIG 1 -#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 */