/* FUSE: Filesystem in Userspace Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> This program can be distributed under the terms of the GNU GPL. See the file COPYING.*/#ifndef _FS_FUSE_I_H#define _FS_FUSE_I_H#ifndef pr_fmt# define pr_fmt(fmt) "fuse: " fmt#endif#include<linux/fuse.h>#include<linux/fs.h>#include<linux/mount.h>#include<linux/wait.h>#include<linux/list.h>#include<linux/spinlock.h>#include<linux/mm.h>#include<linux/backing-dev.h>#include<linux/mutex.h>#include<linux/rwsem.h>#include<linux/rbtree.h>#include<linux/poll.h>#include<linux/workqueue.h>#include<linux/kref.h>#include<linux/xattr.h>#include<linux/pid_namespace.h>#include<linux/refcount.h>#include<linux/user_namespace.h>/** Default max number of pages that can be used in a single read request */#define FUSE_DEFAULT_MAX_PAGES_PER_REQ 32/** Maximum of max_pages received in init_out */#define FUSE_MAX_MAX_PAGES 256/** Bias for fi->writectr, meaning new writepages must not be sent */#define FUSE_NOWRITE INT_MIN/** It could be as large as PATH_MAX, but would that have any uses? */#define FUSE_NAME_MAX 1024/** Number of dentries for each connection in the control filesystem */#define FUSE_CTL_NUM_DENTRIES 5/** List of active connections */externstructlist_headfuse_conn_list;/** Global mutex protecting fuse_conn_list and the control filesystem */externstructmutexfuse_mutex;/** Module parameters */externunsignedmax_user_bgreq;externunsignedmax_user_congthresh;/* One forget request */structfuse_forget_link{structfuse_forget_oneforget_one;structfuse_forget_link*next;};/* Submount lookup tracking */structfuse_submount_lookup{/** Refcount */refcount_tcount;/** Unique ID, which identifies the inode between userspace * and kernel */u64nodeid;/** The request used for sending the FORGET message */structfuse_forget_link*forget;};/** Container for data related to mapping to backing file */structfuse_backing{structfile