From ada08d50a647adb37c77f2106e7adc0db6ab93d5 Mon Sep 17 00:00:00 2001 From: Albert Chen Date: Wed, 27 Nov 2019 01:36:30 -0800 Subject: Added support for FUSE_EXPLICIT_INVAL_DATA to enable (#474) --- include/fuse_common.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/fuse_common.h') diff --git a/include/fuse_common.h b/include/fuse_common.h index 2d686b2..77d4bfe 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -358,6 +358,29 @@ struct fuse_loop_config { */ #define FUSE_CAP_NO_OPENDIR_SUPPORT (1 << 24) +/** + * Indicates support for invalidating cached pages only on explicit request. + * + * If this flag is set in the `capable` field of the `fuse_conn_info` structure, + * then the FUSE kernel module supports invalidating cached pages only on + * explicit request by the filesystem through fuse_lowlevel_notify_inval_inode() + * or fuse_invalidate_path(). + * + * By setting this flag in the `want` field of the `fuse_conn_info` structure, + * the filesystem is responsible for invalidating cached pages through explicit + * requests to the kernel. + * + * Note that setting this flag does not prevent the cached pages from being + * flushed by OS itself and/or through user actions. + * + * Note that if both FUSE_CAP_EXPLICIT_INVAL_DATA and FUSE_CAP_AUTO_INVAL_DATA + * are set in the `capable` field of the `fuse_conn_info` structure then + * FUSE_CAP_AUTO_INVAL_DATA takes precedence. + * + * This feature is disabled by default. + */ +#define FUSE_CAP_EXPLICIT_INVAL_DATA (1 << 25) + /** * Ioctl flags * -- cgit v1.2.3