From 7b0075c06f171cdac7a3d565463c0e5938dff04d Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Mon, 17 Sep 2018 14:53:30 +0100 Subject: Don't enable adaptive readdirplus unless fs has readdir() handler. --- include/fuse_common.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/fuse_common.h b/include/fuse_common.h index 29ad339..83c9dee 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -219,7 +219,7 @@ struct fuse_loop_config { #define FUSE_CAP_AUTO_INVAL_DATA (1 << 12) /** - * Indicates that the filesystem supports readdirplus + * Indicates that the filesystem supports readdirplus. * * This feature is enabled by default when supported by the kernel and if the * filesystem implements a readdirplus() handler. @@ -227,10 +227,21 @@ struct fuse_loop_config { #define FUSE_CAP_READDIRPLUS (1 << 13) /** - * Indicates that the filesystem supports adaptive readdirplus + * Indicates that the filesystem supports adaptive readdirplus. * - * This feature is enabled by default when supported by the kernel and if the - * filesystem implements a readdirplus() handler. + * If FUSE_CAP_READDIRPLUS is not set, this flag has no effect. + * + * If FUSE_CAP_READDIRPLUS is set and this flag is not set, the kernel + * will always issue readdirplus() requests to retrieve directory + * contents. + * + * If FUSE_CAP_READDIRPLUS is set and this flag is set, the kernel + * will issue both readdir() and readdirplus() requests, depending on + * how much information is expected to be required. + * + * This feature is enabled by default when supported by the kernel and + * if the filesystem implements both a readdirplus() and a readdir() + * handler. */ #define FUSE_CAP_READDIRPLUS_AUTO (1 << 14) -- cgit v1.2.3