#ifndef __ORANGEFSKERNEL_H
#define __ORANGEFSKERNEL_H
#include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <linux/statfs.h>
#include <linux/backing-dev.h>
#include <linux/device.h>
#include <linux/mpage.h>
#include <linux/namei.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/vmalloc.h>
#include <linux/aio.h>
#include <linux/posix_acl.h>
#include <linux/posix_acl_xattr.h>
#include <linux/compat.h>
#include <linux/mount.h>
#include <linux/uaccess.h>
#include <linux/atomic.h>
#include <linux/uio.h>
#include <linux/sched/signal.h>
#include <linux/mm.h>
#include <linux/wait.h>
#include <linux/dcache.h>
#include <linux/pagemap.h>
#include <linux/poll.h>
#include <linux/rwsem.h>
#include <linux/xattr.h>
#include <linux/exportfs.h>
#include <linux/hashtable.h>
#include <asm/unaligned.h>
#include "orangefs-dev-proto.h"
#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS …
#define ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS …
#define ORANGEFS_DEFAULT_SLOT_TIMEOUT_SECS …
#define ORANGEFS_REQDEVICE_NAME …
#define ORANGEFS_DEVREQ_MAGIC …
#define ORANGEFS_PURGE_RETRY_COUNT …
#define MAX_DEV_REQ_UPSIZE …
#define MAX_DEV_REQ_DOWNSIZE …
enum orangefs_vfs_op_states { … };
extern const struct xattr_handler * const orangefs_xattr_handlers[];
extern struct posix_acl *orangefs_get_acl(struct inode *inode, int type, bool rcu);
extern int orangefs_set_acl(struct mnt_idmap *idmap,
struct dentry *dentry, struct posix_acl *acl,
int type);
int __orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
struct orangefs_kernel_op_s { … };
#define set_op_state_waiting(op) …
#define set_op_state_inprogress(op) …
#define set_op_state_given_up(op) …
static inline void set_op_state_serviced(struct orangefs_kernel_op_s *op)
{ … }
#define op_state_waiting(op) …
#define op_state_in_progress(op) …
#define op_state_serviced(op) …
#define op_state_purged(op) …
#define op_state_given_up(op) …
#define op_is_cancel(op) …
void op_release(struct orangefs_kernel_op_s *op);
extern void orangefs_bufmap_put(int);
static inline void put_cancel(struct orangefs_kernel_op_s *op)
{ … }
static inline void set_op_state_purged(struct orangefs_kernel_op_s *op)
{ … }
struct orangefs_inode_s { … };
struct orangefs_sb_info_s { … };
struct orangefs_stats { … };
struct orangefs_cached_xattr { … };
struct orangefs_write_range { … };
extern struct orangefs_stats orangefs_stats;
static inline struct orangefs_inode_s *ORANGEFS_I(struct inode *inode)
{ … }
static inline struct orangefs_sb_info_s *ORANGEFS_SB(struct super_block *sb)
{ … }
static inline ino_t orangefs_khandle_to_ino(struct orangefs_khandle *khandle)
{ … }
static inline struct orangefs_khandle *get_khandle_from_ino(struct inode *inode)
{ … }
static inline int is_root_handle(struct inode *inode)
{ … }
static inline int match_handle(struct orangefs_khandle resp_handle,
struct inode *inode)
{ … }
int op_cache_initialize(void);
int op_cache_finalize(void);
struct orangefs_kernel_op_s *op_alloc(__s32 type);
void orangefs_new_tag(struct orangefs_kernel_op_s *op);
char *get_opname_string(struct orangefs_kernel_op_s *new_op);
int orangefs_inode_cache_initialize(void);
int orangefs_inode_cache_finalize(void);
void purge_inprogress_ops(void);
void purge_waiting_ops(void);
extern uint64_t orangefs_features;
struct dentry *orangefs_mount(struct file_system_type *fst,
int flags,
const char *devname,
void *data);
void orangefs_kill_sb(struct super_block *sb);
int orangefs_remount(struct orangefs_sb_info_s *);
int fsid_key_table_initialize(void);
void fsid_key_table_finalize(void);
vm_fault_t orangefs_page_mkwrite(struct vm_fault *);
struct inode *orangefs_new_inode(struct super_block *sb,
struct inode *dir,
umode_t mode,
dev_t dev,
struct orangefs_object_kref *ref);
int __orangefs_setattr(struct inode *, struct iattr *);
int __orangefs_setattr_mode(struct dentry *dentry, struct iattr *iattr);
int orangefs_setattr(struct mnt_idmap *, struct dentry *, struct iattr *);
int orangefs_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, u32 request_mask, unsigned int flags);
int orangefs_permission(struct mnt_idmap *idmap,
struct inode *inode, int mask);
int orangefs_update_time(struct inode *, int);
ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size);
struct inode *orangefs_iget(struct super_block *sb,
struct orangefs_object_kref *ref);
extern uint32_t orangefs_userspace_version;
int orangefs_dev_init(void);
void orangefs_dev_cleanup(void);
int is_daemon_in_service(void);
bool __is_daemon_in_service(void);
int orangefs_revalidate_mapping(struct inode *);
ssize_t wait_for_direct_io(enum ORANGEFS_io_type, struct inode *, loff_t *,
struct iov_iter *, size_t, loff_t, struct orangefs_write_range *, int *,
struct file *);
ssize_t do_readv_writev(enum ORANGEFS_io_type, struct file *, loff_t *,
struct iov_iter *);
__s32 fsid_of_op(struct orangefs_kernel_op_s *op);
ssize_t orangefs_inode_getxattr(struct inode *inode,
const char *name,
void *buffer,
size_t size);
int orangefs_inode_setxattr(struct inode *inode,
const char *name,
const void *value,
size_t size,
int flags);
#define ORANGEFS_GETATTR_NEW …
#define ORANGEFS_GETATTR_SIZE …
int orangefs_inode_getattr(struct inode *, int);
int orangefs_inode_check_changed(struct inode *inode);
int orangefs_inode_setattr(struct inode *inode);
bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op);
int orangefs_normalize_to_errno(__s32 error_code);
extern struct mutex orangefs_request_mutex;
extern int op_timeout_secs;
extern int slot_timeout_secs;
extern int orangefs_cache_timeout_msecs;
extern int orangefs_dcache_timeout_msecs;
extern int orangefs_getattr_timeout_msecs;
extern struct list_head orangefs_superblocks;
extern spinlock_t orangefs_superblocks_lock;
extern struct list_head orangefs_request_list;
extern spinlock_t orangefs_request_list_lock;
extern wait_queue_head_t orangefs_request_list_waitq;
extern struct list_head *orangefs_htable_ops_in_progress;
extern spinlock_t orangefs_htable_ops_in_progress_lock;
extern int hash_table_size;
extern const struct file_operations orangefs_file_operations;
extern const struct inode_operations orangefs_symlink_inode_operations;
extern const struct inode_operations orangefs_dir_inode_operations;
extern const struct file_operations orangefs_dir_operations;
extern const struct dentry_operations orangefs_dentry_operations;
#define ORANGEFS_OP_INTERRUPTIBLE …
#define ORANGEFS_OP_PRIORITY …
#define ORANGEFS_OP_CANCELLATION …
#define ORANGEFS_OP_NO_MUTEX …
#define ORANGEFS_OP_ASYNC …
#define ORANGEFS_OP_WRITEBACK …
int service_operation(struct orangefs_kernel_op_s *op,
const char *op_name,
int flags);
#define get_interruptible_flag(inode) …
#define fill_default_sys_attrs(sys_attr, type, mode) …
static inline void orangefs_set_timeout(struct dentry *dentry)
{ … }
#endif