aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2010-12-07 14:16:56 -0500
committerMiklos Szeredi <mszeredi@suse.cz>2010-12-07 14:16:56 -0500
commit02c048b919455aaa38628563cdcc2e691c8a9f53 (patch)
tree1f98cd9fab564b6df8869a60f36e82d5d20f14f3 /include/linux/fuse.h
parent07e77dca8a1f17a724a9b7449f0ca02e70e9d057 (diff)
fuse: allow batching of FORGET requests
Terje Malmedal reports that a fuse filesystem with 32 million inodes on a machine with lots of memory can take up to 30 minutes to process FORGET requests when all those inodes are evicted from the icache. To solve this, create a BATCH_FORGET request that allows up to about 8000 FORGET requests to be sent in a single message. This request is only sent if userspace supports interface version 7.16 or later, otherwise fall back to sending individual FORGET messages. Reported-by: Terje Malmedal <terje.malmedal@usit.uio.no> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'include/linux/fuse.h')
-rw-r--r--include/linux/fuse.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index c3c578e09833..cf11881f4938 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -41,6 +41,9 @@
41 * 7.15 41 * 7.15
42 * - add store notify 42 * - add store notify
43 * - add retrieve notify 43 * - add retrieve notify
44 *
45 * 7.16
46 * - add BATCH_FORGET request
44 */ 47 */
45 48
46#ifndef _LINUX_FUSE_H 49#ifndef _LINUX_FUSE_H
@@ -72,7 +75,7 @@
72#define FUSE_KERNEL_VERSION 7 75#define FUSE_KERNEL_VERSION 7
73 76
74/** Minor version number of this interface */ 77/** Minor version number of this interface */
75#define FUSE_KERNEL_MINOR_VERSION 15 78#define FUSE_KERNEL_MINOR_VERSION 16
76 79
77/** The node ID of the root inode */ 80/** The node ID of the root inode */
78#define FUSE_ROOT_ID 1 81#define FUSE_ROOT_ID 1
@@ -256,6 +259,7 @@ enum fuse_opcode {
256 FUSE_IOCTL = 39, 259 FUSE_IOCTL = 39,
257 FUSE_POLL = 40, 260 FUSE_POLL = 40,
258 FUSE_NOTIFY_REPLY = 41, 261 FUSE_NOTIFY_REPLY = 41,
262 FUSE_BATCH_FORGET = 42,
259 263
260 /* CUSE specific operations */ 264 /* CUSE specific operations */
261 CUSE_INIT = 4096, 265 CUSE_INIT = 4096,
@@ -290,6 +294,16 @@ struct fuse_forget_in {
290 __u64 nlookup; 294 __u64 nlookup;
291}; 295};
292 296
297struct fuse_forget_one {
298 __u64 nodeid;
299 __u64 nlookup;
300};
301
302struct fuse_batch_forget_in {
303 __u32 count;
304 __u32 dummy;
305};
306
293struct fuse_getattr_in { 307struct fuse_getattr_in {
294 __u32 getattr_flags; 308 __u32 getattr_flags;
295 __u32 dummy; 309 __u32 dummy;