OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.
[deliverable/linux.git] / fs / orangefs / pvfs2-kernel.h
index 4295e263e25b153df3ac42d47571a0242a954d7c..33fcf3bccd2e925eded767336cb0d5485bf1aeaf 100644 (file)
@@ -5,18 +5,18 @@
  */
 
 /*
- *  The PVFS2 Linux kernel support allows PVFS2 volumes to be mounted and
+ *  The ORANGEFS Linux kernel support allows ORANGEFS volumes to be mounted and
  *  accessed through the Linux VFS (i.e. using standard I/O system calls).
  *  This support is only needed on clients that wish to mount the file system.
  *
  */
 
 /*
- *  Declarations and macros for the PVFS2 Linux kernel support.
+ *  Declarations and macros for the ORANGEFS Linux kernel support.
  */
 
-#ifndef __PVFS2KERNEL_H
-#define __PVFS2KERNEL_H
+#ifndef __ORANGEFSKERNEL_H
+#define __ORANGEFSKERNEL_H
 
 #include <linux/kernel.h>
 #include <linux/moduleparam.h>
 
 #include "pvfs2-dev-proto.h"
 
-#ifdef PVFS2_KERNEL_DEBUG
-#define PVFS2_DEFAULT_OP_TIMEOUT_SECS       10
+#ifdef ORANGEFS_KERNEL_DEBUG
+#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS       10
 #else
-#define PVFS2_DEFAULT_OP_TIMEOUT_SECS       20
+#define ORANGEFS_DEFAULT_OP_TIMEOUT_SECS       20
 #endif
 
-#define PVFS2_BUFMAP_WAIT_TIMEOUT_SECS      30
+#define ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS   30
 
-#define PVFS2_DEFAULT_SLOT_TIMEOUT_SECS     900        /* 15 minutes */
+#define ORANGEFS_DEFAULT_SLOT_TIMEOUT_SECS     900     /* 15 minutes */
 
-#define PVFS2_REQDEVICE_NAME          "pvfs2-req"
+#define ORANGEFS_REQDEVICE_NAME          "pvfs2-req"
 
-#define PVFS2_DEVREQ_MAGIC             0x20030529
-#define PVFS2_LINK_MAX                 0x000000FF
-#define PVFS2_PURGE_RETRY_COUNT        0x00000005
-#define PVFS2_SEEK_END                 0x00000002
-#define PVFS2_MAX_NUM_OPTIONS          0x00000004
-#define PVFS2_MAX_MOUNT_OPT_LEN        0x00000080
-#define PVFS2_MAX_FSKEY_LEN            64
+#define ORANGEFS_DEVREQ_MAGIC             0x20030529
+#define ORANGEFS_LINK_MAX                 0x000000FF
+#define ORANGEFS_PURGE_RETRY_COUNT     0x00000005
+#define ORANGEFS_SEEK_END              0x00000002
+#define ORANGEFS_MAX_NUM_OPTIONS          0x00000004
+#define ORANGEFS_MAX_MOUNT_OPT_LEN        0x00000080
+#define ORANGEFS_MAX_FSKEY_LEN            64
 
 #define MAX_DEV_REQ_UPSIZE (2*sizeof(__s32) +   \
-sizeof(__u64) + sizeof(struct pvfs2_upcall_s))
+sizeof(__u64) + sizeof(struct orangefs_upcall_s))
 #define MAX_DEV_REQ_DOWNSIZE (2*sizeof(__s32) + \
-sizeof(__u64) + sizeof(struct pvfs2_downcall_s))
+sizeof(__u64) + sizeof(struct orangefs_downcall_s))
 
 #define BITS_PER_LONG_DIV_8 (BITS_PER_LONG >> 3)
 
@@ -104,7 +104,7 @@ sizeof(__u64) + sizeof(struct pvfs2_downcall_s))
                        MAX_DEV_REQ_DOWNSIZE))
 
 /*
- * valid pvfs2 kernel operation states
+ * valid orangefs kernel operation states
  *
  * unknown  - op was just initialized
  * waiting  - op is on request_list (upward bound)
@@ -113,7 +113,7 @@ sizeof(__u64) + sizeof(struct pvfs2_downcall_s))
  * purged   - op has to start a timer since client-core
  *            exited uncleanly before servicing op
  */
-enum pvfs2_vfs_op_states {
+enum orangefs_vfs_op_states {
        OP_VFS_STATE_UNKNOWN = 0,
        OP_VFS_STATE_WAITING = 1,
        OP_VFS_STATE_INPROGR = 2,
@@ -156,9 +156,9 @@ enum pvfs2_vfs_op_states {
 /*
  * Defines for controlling whether I/O upcalls are for async or sync operations
  */
-enum PVFS_async_io_type {
-       PVFS_VFS_SYNC_IO = 0,
-       PVFS_VFS_ASYNC_IO = 1,
+enum ORANGEFS_async_io_type {
+       ORANGEFS_VFS_SYNC_IO = 0,
+       ORANGEFS_VFS_ASYNC_IO = 1,
 };
 
 /*
@@ -172,24 +172,24 @@ struct client_debug_mask {
 };
 
 /*
- * pvfs2 kernel memory related flags
+ * orangefs kernel memory related flags
  */
 
-#if ((defined PVFS2_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB))
-#define PVFS2_CACHE_CREATE_FLAGS SLAB_RED_ZONE
+#if ((defined ORANGEFS_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB))
+#define ORANGEFS_CACHE_CREATE_FLAGS SLAB_RED_ZONE
 #else
-#define PVFS2_CACHE_CREATE_FLAGS 0
-#endif /* ((defined PVFS2_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB)) */
+#define ORANGEFS_CACHE_CREATE_FLAGS 0
+#endif /* ((defined ORANGEFS_KERNEL_DEBUG) && (defined CONFIG_DEBUG_SLAB)) */
 
-#define PVFS2_CACHE_ALLOC_FLAGS (GFP_KERNEL)
-#define PVFS2_GFP_FLAGS (GFP_KERNEL)
-#define PVFS2_BUFMAP_GFP_FLAGS (GFP_KERNEL)
+#define ORANGEFS_CACHE_ALLOC_FLAGS (GFP_KERNEL)
+#define ORANGEFS_GFP_FLAGS (GFP_KERNEL)
+#define ORANGEFS_BUFMAP_GFP_FLAGS (GFP_KERNEL)
 
-/* pvfs2 xattr and acl related defines */
-#define PVFS2_XATTR_INDEX_POSIX_ACL_ACCESS  1
-#define PVFS2_XATTR_INDEX_POSIX_ACL_DEFAULT 2
-#define PVFS2_XATTR_INDEX_TRUSTED           3
-#define PVFS2_XATTR_INDEX_DEFAULT           4
+/* orangefs xattr and acl related defines */
+#define ORANGEFS_XATTR_INDEX_POSIX_ACL_ACCESS  1
+#define ORANGEFS_XATTR_INDEX_POSIX_ACL_DEFAULT 2
+#define ORANGEFS_XATTR_INDEX_TRUSTED           3
+#define ORANGEFS_XATTR_INDEX_DEFAULT           4
 
 #if 0
 #ifndef POSIX_ACL_XATTR_ACCESS
@@ -200,17 +200,17 @@ struct client_debug_mask {
 #endif
 #endif
 
-#define PVFS2_XATTR_NAME_ACL_ACCESS  POSIX_ACL_XATTR_ACCESS
-#define PVFS2_XATTR_NAME_ACL_DEFAULT POSIX_ACL_XATTR_DEFAULT
-#define PVFS2_XATTR_NAME_TRUSTED_PREFIX "trusted."
-#define PVFS2_XATTR_NAME_DEFAULT_PREFIX ""
+#define ORANGEFS_XATTR_NAME_ACL_ACCESS  POSIX_ACL_XATTR_ACCESS
+#define ORANGEFS_XATTR_NAME_ACL_DEFAULT POSIX_ACL_XATTR_DEFAULT
+#define ORANGEFS_XATTR_NAME_TRUSTED_PREFIX "trusted."
+#define ORANGEFS_XATTR_NAME_DEFAULT_PREFIX ""
 
-/* these functions are defined in pvfs2-utils.c */
+/* these functions are defined in orangefs-utils.c */
 int orangefs_prepare_cdm_array(char *debug_array_string);
 int orangefs_prepare_debugfs_help_string(int);
 
-/* defined in pvfs2-debugfs.c */
-int pvfs2_client_debug_init(void);
+/* defined in orangefs-debugfs.c */
+int orangefs_client_debug_init(void);
 
 void debug_string_to_mask(char *, void *, int);
 void do_c_mask(int, char *, struct client_debug_mask **);
@@ -222,17 +222,17 @@ void do_c_string(void *, int);
 int check_amalgam_keyword(void *, int);
 int keyword_is_amalgam(char *);
 
-/*these variables are defined in pvfs2-mod.c */
-extern char kernel_debug_string[PVFS2_MAX_DEBUG_STRING_LEN];
-extern char client_debug_string[PVFS2_MAX_DEBUG_STRING_LEN];
-extern char client_debug_array_string[PVFS2_MAX_DEBUG_STRING_LEN];
+/*these variables are defined in orangefs-mod.c */
+extern char kernel_debug_string[ORANGEFS_MAX_DEBUG_STRING_LEN];
+extern char client_debug_string[ORANGEFS_MAX_DEBUG_STRING_LEN];
+extern char client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN];
 extern unsigned int kernel_mask_set_mod_init;
 
-extern int pvfs2_init_acl(struct inode *inode, struct inode *dir);
-extern const struct xattr_handler *pvfs2_xattr_handlers[];
+extern int orangefs_init_acl(struct inode *inode, struct inode *dir);
+extern const struct xattr_handler *orangefs_xattr_handlers[];
 
-extern struct posix_acl *pvfs2_get_acl(struct inode *inode, int type);
-extern int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type);
+extern struct posix_acl *orangefs_get_acl(struct inode *inode, int type);
+extern int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type);
 
 /*
  * Redefine xtvec structure so that we could move helper functions out of
@@ -244,10 +244,10 @@ struct xtvec {
 };
 
 /*
- * pvfs2 data structures
+ * orangefs data structures
  */
-struct pvfs2_kernel_op_s {
-       enum pvfs2_vfs_op_states op_state;
+struct orangefs_kernel_op_s {
+       enum orangefs_vfs_op_states op_state;
        __u64 tag;
 
        /*
@@ -257,8 +257,8 @@ struct pvfs2_kernel_op_s {
         */
        int uses_shared_memory;
 
-       struct pvfs2_upcall_s upcall;
-       struct pvfs2_downcall_s downcall;
+       struct orangefs_upcall_s upcall;
+       struct orangefs_downcall_s downcall;
 
        wait_queue_head_t waitq;
        spinlock_t lock;
@@ -268,7 +268,7 @@ struct pvfs2_kernel_op_s {
 
        /* VFS aio fields */
 
-       /* used by the async I/O code to stash the pvfs2_kiocb_s structure */
+       /* used by the async I/O code to stash the orangefs_kiocb_s structure */
        void *priv;
 
        /* used again for the async I/O code for deallocation */
@@ -279,14 +279,14 @@ struct pvfs2_kernel_op_s {
        struct list_head list;
 };
 
-/* per inode private pvfs2 info */
-struct pvfs2_inode_s {
-       struct pvfs2_object_kref refn;
-       char link_target[PVFS_NAME_MAX];
+/* per inode private orangefs info */
+struct orangefs_inode_s {
+       struct orangefs_object_kref refn;
+       char link_target[ORANGEFS_NAME_MAX];
        __s64 blksize;
        /*
         * Reading/Writing Extended attributes need to acquire the appropriate
-        * reader/writer semaphore on the pvfs2_inode_s structure.
+        * reader/writer semaphore on the orangefs_inode_s structure.
         */
        struct rw_semaphore xattr_sem;
 
@@ -299,7 +299,7 @@ struct pvfs2_inode_s {
         */
        unsigned long pinode_flags;
 
-       /* All allocated pvfs2_inode_s objects are chained to a list */
+       /* All allocated orangefs_inode_s objects are chained to a list */
        struct list_head list;
 };
 
@@ -324,15 +324,15 @@ struct pvfs2_inode_s {
 #define SetModeFlag(pinode)   set_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
 #define ModeFlag(pinode)      test_bit(P_MODE_FLAG, &(pinode)->pinode_flags)
 
-/* per superblock private pvfs2 info */
-struct pvfs2_sb_info_s {
-       struct pvfs2_khandle root_khandle;
+/* per superblock private orangefs info */
+struct orangefs_sb_info_s {
+       struct orangefs_khandle root_khandle;
        __s32 fs_id;
        int id;
        int flags;
-#define PVFS2_OPT_INTR         0x01
-#define PVFS2_OPT_LOCAL_LOCK   0x02
-       char devname[PVFS_MAX_SERVER_ADDR_LEN];
+#define ORANGEFS_OPT_INTR      0x01
+#define ORANGEFS_OPT_LOCAL_LOCK        0x02
+       char devname[ORANGEFS_MAX_SERVER_ADDR_LEN];
        struct super_block *sb;
        int mount_pending;
        struct list_head list;
@@ -344,7 +344,7 @@ struct pvfs2_sb_info_s {
  * or even completion notification so that the VFS client-side daemon
  * can free up its vfs_request slots.
  */
-struct pvfs2_kiocb_s {
+struct orangefs_kiocb_s {
        /* the pointer to the task that initiated the AIO */
        struct task_struct *tsk;
 
@@ -352,11 +352,11 @@ struct pvfs2_kiocb_s {
        struct kiocb *kiocb;
 
        /* buffer index that was used for the I/O */
-       struct pvfs2_bufmap *bufmap;
+       struct orangefs_bufmap *bufmap;
        int buffer_index;
 
-       /* pvfs2 kernel operation type */
-       struct pvfs2_kernel_op_s *op;
+       /* orangefs kernel operation type */
+       struct orangefs_kernel_op_s *op;
 
        /* The user space buffers from/to which I/O is being staged */
        struct iovec *iov;
@@ -377,31 +377,31 @@ struct pvfs2_kiocb_s {
        int needs_cleanup;
 };
 
-struct pvfs2_stats {
+struct orangefs_stats {
        unsigned long cache_hits;
        unsigned long cache_misses;
        unsigned long reads;
        unsigned long writes;
 };
 
-extern struct pvfs2_stats g_pvfs2_stats;
+extern struct orangefs_stats g_orangefs_stats;
 
 /*
  * NOTE: See Documentation/filesystems/porting for information
  * on implementing FOO_I and properly accessing fs private data
  */
-static inline struct pvfs2_inode_s *PVFS2_I(struct inode *inode)
+static inline struct orangefs_inode_s *ORANGEFS_I(struct inode *inode)
 {
-       return container_of(inode, struct pvfs2_inode_s, vfs_inode);
+       return container_of(inode, struct orangefs_inode_s, vfs_inode);
 }
 
-static inline struct pvfs2_sb_info_s *PVFS2_SB(struct super_block *sb)
+static inline struct orangefs_sb_info_s *ORANGEFS_SB(struct super_block *sb)
 {
-       return (struct pvfs2_sb_info_s *) sb->s_fs_info;
+       return (struct orangefs_sb_info_s *) sb->s_fs_info;
 }
 
 /* ino_t descends from "unsigned long", 8 bytes, 64 bits. */
-static inline ino_t pvfs2_khandle_to_ino(struct pvfs2_khandle *khandle)
+static inline ino_t orangefs_khandle_to_ino(struct orangefs_khandle *khandle)
 {
        union {
                unsigned char u[8];
@@ -420,23 +420,23 @@ static inline ino_t pvfs2_khandle_to_ino(struct pvfs2_khandle *khandle)
        return ihandle.ino;
 }
 
-static inline struct pvfs2_khandle *get_khandle_from_ino(struct inode *inode)
+static inline struct orangefs_khandle *get_khandle_from_ino(struct inode *inode)
 {
-       return &(PVFS2_I(inode)->refn.khandle);
+       return &(ORANGEFS_I(inode)->refn.khandle);
 }
 
 static inline __s32 get_fsid_from_ino(struct inode *inode)
 {
-       return PVFS2_I(inode)->refn.fs_id;
+       return ORANGEFS_I(inode)->refn.fs_id;
 }
 
 static inline ino_t get_ino_from_khandle(struct inode *inode)
 {
-       struct pvfs2_khandle *khandle;
+       struct orangefs_khandle *khandle;
        ino_t ino;
 
        khandle = get_khandle_from_ino(inode);
-       ino = pvfs2_khandle_to_ino(khandle);
+       ino = orangefs_khandle_to_ino(khandle);
        return ino;
 }
 
@@ -450,17 +450,17 @@ static inline int is_root_handle(struct inode *inode)
        gossip_debug(GOSSIP_DCACHE_DEBUG,
                     "%s: root handle: %pU, this handle: %pU:\n",
                     __func__,
-                    &PVFS2_SB(inode->i_sb)->root_khandle,
+                    &ORANGEFS_SB(inode->i_sb)->root_khandle,
                     get_khandle_from_ino(inode));
 
-       if (PVFS_khandle_cmp(&(PVFS2_SB(inode->i_sb)->root_khandle),
+       if (ORANGEFS_khandle_cmp(&(ORANGEFS_SB(inode->i_sb)->root_khandle),
                             get_khandle_from_ino(inode)))
                return 0;
        else
                return 1;
 }
 
-static inline int match_handle(struct pvfs2_khandle resp_handle,
+static inline int match_handle(struct orangefs_khandle resp_handle,
                               struct inode *inode)
 {
        gossip_debug(GOSSIP_DCACHE_DEBUG,
@@ -469,57 +469,57 @@ static inline int match_handle(struct pvfs2_khandle resp_handle,
                     &resp_handle,
                     get_khandle_from_ino(inode));
 
-       if (PVFS_khandle_cmp(&resp_handle, get_khandle_from_ino(inode)))
+       if (ORANGEFS_khandle_cmp(&resp_handle, get_khandle_from_ino(inode)))
                return 0;
        else
                return 1;
 }
 
 /*
- * defined in pvfs2-cache.c
+ * defined in orangefs-cache.c
  */
 int op_cache_initialize(void);
 int op_cache_finalize(void);
-struct pvfs2_kernel_op_s *op_alloc(__s32 type);
-char *get_opname_string(struct pvfs2_kernel_op_s *new_op);
-void op_release(struct pvfs2_kernel_op_s *op);
+struct orangefs_kernel_op_s *op_alloc(__s32 type);
+char *get_opname_string(struct orangefs_kernel_op_s *new_op);
+void op_release(struct orangefs_kernel_op_s *op);
 
 int dev_req_cache_initialize(void);
 int dev_req_cache_finalize(void);
 void *dev_req_alloc(void);
 void dev_req_release(void *);
 
-int pvfs2_inode_cache_initialize(void);
-int pvfs2_inode_cache_finalize(void);
+int orangefs_inode_cache_initialize(void);
+int orangefs_inode_cache_finalize(void);
 
 int kiocb_cache_initialize(void);
 int kiocb_cache_finalize(void);
-struct pvfs2_kiocb_s *kiocb_alloc(void);
-void kiocb_release(struct pvfs2_kiocb_s *ptr);
+struct orangefs_kiocb_s *kiocb_alloc(void);
+void kiocb_release(struct orangefs_kiocb_s *ptr);
 
 /*
- * defined in pvfs2-mod.c
+ * defined in orangefs-mod.c
  */
 void purge_inprogress_ops(void);
 
 /*
  * defined in waitqueue.c
  */
-int wait_for_matching_downcall(struct pvfs2_kernel_op_s *op);
-int wait_for_cancellation_downcall(struct pvfs2_kernel_op_s *op);
-void pvfs2_clean_up_interrupted_operation(struct pvfs2_kernel_op_s *op);
+int wait_for_matching_downcall(struct orangefs_kernel_op_s *op);
+int wait_for_cancellation_downcall(struct orangefs_kernel_op_s *op);
+void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op);
 void purge_waiting_ops(void);
 
 /*
  * defined in super.c
  */
-struct dentry *pvfs2_mount(struct file_system_type *fst,
+struct dentry *orangefs_mount(struct file_system_type *fst,
                           int flags,
                           const char *devname,
                           void *data);
 
-void pvfs2_kill_sb(struct super_block *sb);
-int pvfs2_remount(struct super_block *sb);
+void orangefs_kill_sb(struct super_block *sb);
+int orangefs_remount(struct super_block *sb);
 
 int fsid_key_table_initialize(void);
 void fsid_key_table_finalize(void);
@@ -527,175 +527,175 @@ void fsid_key_table_finalize(void);
 /*
  * defined in inode.c
  */
-__u32 convert_to_pvfs2_mask(unsigned long lite_mask);
-struct inode *pvfs2_new_inode(struct super_block *sb,
+__u32 convert_to_orangefs_mask(unsigned long lite_mask);
+struct inode *orangefs_new_inode(struct super_block *sb,
                              struct inode *dir,
                              int mode,
                              dev_t dev,
-                             struct pvfs2_object_kref *ref);
+                             struct orangefs_object_kref *ref);
 
-int pvfs2_setattr(struct dentry *dentry, struct iattr *iattr);
+int orangefs_setattr(struct dentry *dentry, struct iattr *iattr);
 
-int pvfs2_getattr(struct vfsmount *mnt,
+int orangefs_getattr(struct vfsmount *mnt,
                  struct dentry *dentry,
                  struct kstat *kstat);
 
 /*
  * defined in xattr.c
  */
-int pvfs2_setxattr(struct dentry *dentry,
+int orangefs_setxattr(struct dentry *dentry,
                   const char *name,
                   const void *value,
                   size_t size,
                   int flags);
 
-ssize_t pvfs2_getxattr(struct dentry *dentry,
+ssize_t orangefs_getxattr(struct dentry *dentry,
                       const char *name,
                       void *buffer,
                       size_t size);
 
-ssize_t pvfs2_listxattr(struct dentry *dentry, char *buffer, size_t size);
+ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size);
 
 /*
  * defined in namei.c
  */
-struct inode *pvfs2_iget(struct super_block *sb,
-                        struct pvfs2_object_kref *ref);
+struct inode *orangefs_iget(struct super_block *sb,
+                        struct orangefs_object_kref *ref);
 
-ssize_t pvfs2_inode_read(struct inode *inode,
-                        struct iov_iter *iter,
-                        loff_t *offset,
-                        loff_t readahead_size);
+ssize_t orangefs_inode_read(struct inode *inode,
+                           struct iov_iter *iter,
+                           loff_t *offset,
+                           loff_t readahead_size);
 
 /*
- * defined in devpvfs2-req.c
+ * defined in devorangefs-req.c
  */
-int pvfs2_dev_init(void);
-void pvfs2_dev_cleanup(void);
+int orangefs_dev_init(void);
+void orangefs_dev_cleanup(void);
 int is_daemon_in_service(void);
 int fs_mount_pending(__s32 fsid);
 
 /*
- * defined in pvfs2-utils.c
+ * defined in orangefs-utils.c
  */
-__s32 fsid_of_op(struct pvfs2_kernel_op_s *op);
+__s32 fsid_of_op(struct orangefs_kernel_op_s *op);
 
-int pvfs2_flush_inode(struct inode *inode);
+int orangefs_flush_inode(struct inode *inode);
 
-ssize_t pvfs2_inode_getxattr(struct inode *inode,
+ssize_t orangefs_inode_getxattr(struct inode *inode,
                             const char *prefix,
                             const char *name,
                             void *buffer,
                             size_t size);
 
-int pvfs2_inode_setxattr(struct inode *inode,
+int orangefs_inode_setxattr(struct inode *inode,
                         const char *prefix,
                         const char *name,
                         const void *value,
                         size_t size,
                         int flags);
 
-int pvfs2_inode_getattr(struct inode *inode, __u32 mask);
+int orangefs_inode_getattr(struct inode *inode, __u32 mask);
 
-int pvfs2_inode_setattr(struct inode *inode, struct iattr *iattr);
+int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr);
 
-void pvfs2_op_initialize(struct pvfs2_kernel_op_s *op);
+void orangefs_op_initialize(struct orangefs_kernel_op_s *op);
 
-void pvfs2_make_bad_inode(struct inode *inode);
+void orangefs_make_bad_inode(struct inode *inode);
 
 void block_signals(sigset_t *);
 
 void set_signals(sigset_t *);
 
-int pvfs2_unmount_sb(struct super_block *sb);
+int orangefs_unmount_sb(struct super_block *sb);
 
-int pvfs2_cancel_op_in_progress(__u64 tag);
+int orangefs_cancel_op_in_progress(__u64 tag);
 
-static inline __u64 pvfs2_convert_time_field(const struct timespec *ts)
+static inline __u64 orangefs_convert_time_field(const struct timespec *ts)
 {
        return (__u64)ts->tv_sec;
 }
 
-int pvfs2_normalize_to_errno(__s32 error_code);
+int orangefs_normalize_to_errno(__s32 error_code);
 
 extern struct mutex devreq_mutex;
 extern struct mutex request_mutex;
 extern int debug;
 extern int op_timeout_secs;
 extern int slot_timeout_secs;
-extern struct list_head pvfs2_superblocks;
-extern spinlock_t pvfs2_superblocks_lock;
-extern struct list_head pvfs2_request_list;
-extern spinlock_t pvfs2_request_list_lock;
-extern wait_queue_head_t pvfs2_request_list_waitq;
+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 *htable_ops_in_progress;
 extern spinlock_t htable_ops_in_progress_lock;
 extern int hash_table_size;
 
-extern const struct address_space_operations pvfs2_address_operations;
-extern struct backing_dev_info pvfs2_backing_dev_info;
-extern struct inode_operations pvfs2_file_inode_operations;
-extern const struct file_operations pvfs2_file_operations;
-extern struct inode_operations pvfs2_symlink_inode_operations;
-extern struct inode_operations pvfs2_dir_inode_operations;
-extern const struct file_operations pvfs2_dir_operations;
-extern const struct dentry_operations pvfs2_dentry_operations;
-extern const struct file_operations pvfs2_devreq_file_operations;
+extern const struct address_space_operations orangefs_address_operations;
+extern struct backing_dev_info orangefs_backing_dev_info;
+extern struct inode_operations orangefs_file_inode_operations;
+extern const struct file_operations orangefs_file_operations;
+extern struct inode_operations orangefs_symlink_inode_operations;
+extern struct inode_operations orangefs_dir_inode_operations;
+extern const struct file_operations orangefs_dir_operations;
+extern const struct dentry_operations orangefs_dentry_operations;
+extern const struct file_operations orangefs_devreq_file_operations;
 
-extern wait_queue_head_t pvfs2_bufmap_init_waitq;
+extern wait_queue_head_t orangefs_bufmap_init_waitq;
 
 /*
  * misc convenience macros
  */
 #define add_op_to_request_list(op)                             \
 do {                                                           \
-       spin_lock(&pvfs2_request_list_lock);                    \
+       spin_lock(&orangefs_request_list_lock);                 \
        spin_lock(&op->lock);                                   \
        set_op_state_waiting(op);                               \
-       list_add_tail(&op->list, &pvfs2_request_list);          \
-       spin_unlock(&pvfs2_request_list_lock);                  \
+       list_add_tail(&op->list, &orangefs_request_list);               \
+       spin_unlock(&orangefs_request_list_lock);                       \
        spin_unlock(&op->lock);                                 \
-       wake_up_interruptible(&pvfs2_request_list_waitq);       \
+       wake_up_interruptible(&orangefs_request_list_waitq);    \
 } while (0)
 
 #define add_priority_op_to_request_list(op)                            \
        do {                                                            \
-               spin_lock(&pvfs2_request_list_lock);                    \
+               spin_lock(&orangefs_request_list_lock);                 \
                spin_lock(&op->lock);                                   \
                set_op_state_waiting(op);                               \
                                                                        \
-               list_add(&op->list, &pvfs2_request_list);               \
-               spin_unlock(&pvfs2_request_list_lock);                  \
+               list_add(&op->list, &orangefs_request_list);            \
+               spin_unlock(&orangefs_request_list_lock);                       \
                spin_unlock(&op->lock);                                 \
-               wake_up_interruptible(&pvfs2_request_list_waitq);       \
+               wake_up_interruptible(&orangefs_request_list_waitq);    \
 } while (0)
 
 #define remove_op_from_request_list(op)                                        \
        do {                                                            \
                struct list_head *tmp = NULL;                           \
                struct list_head *tmp_safe = NULL;                      \
-               struct pvfs2_kernel_op_s *tmp_op = NULL;                \
+               struct orangefs_kernel_op_s *tmp_op = NULL;             \
                                                                        \
-               spin_lock(&pvfs2_request_list_lock);                    \
-               list_for_each_safe(tmp, tmp_safe, &pvfs2_request_list) { \
+               spin_lock(&orangefs_request_list_lock);                 \
+               list_for_each_safe(tmp, tmp_safe, &orangefs_request_list) { \
                        tmp_op = list_entry(tmp,                        \
-                                           struct pvfs2_kernel_op_s,   \
+                                           struct orangefs_kernel_op_s,        \
                                            list);                      \
                        if (tmp_op && (tmp_op == op)) {                 \
                                list_del(&tmp_op->list);                \
                                break;                                  \
                        }                                               \
                }                                                       \
-               spin_unlock(&pvfs2_request_list_lock);                  \
+               spin_unlock(&orangefs_request_list_lock);                       \
        } while (0)
 
-#define PVFS2_OP_INTERRUPTIBLE 1   /* service_operation() is interruptible */
-#define PVFS2_OP_PRIORITY      2   /* service_operation() is high priority */
-#define PVFS2_OP_CANCELLATION  4   /* this is a cancellation */
-#define PVFS2_OP_NO_SEMAPHORE  8   /* don't acquire semaphore */
-#define PVFS2_OP_ASYNC         16  /* Queue it, but don't wait */
+#define ORANGEFS_OP_INTERRUPTIBLE 1   /* service_operation() is interruptible */
+#define ORANGEFS_OP_PRIORITY      2   /* service_operation() is high priority */
+#define ORANGEFS_OP_CANCELLATION  4   /* this is a cancellation */
+#define ORANGEFS_OP_NO_SEMAPHORE  8   /* don't acquire semaphore */
+#define ORANGEFS_OP_ASYNC         16  /* Queue it, but don't wait */
 
-int service_operation(struct pvfs2_kernel_op_s *op,
+int service_operation(struct orangefs_kernel_op_s *op,
                      const char *op_name,
                      int flags);
 
@@ -719,7 +719,7 @@ int service_operation(struct pvfs2_kernel_op_s *op,
  * sent and have handle_error
  * take care of this situation as well..
  *
- * if a pvfs2 sysint level error occured and i/o has been completed,
+ * if a orangefs sysint level error occured and i/o has been completed,
  * there is no need to cancel the operation, as the user has finished
  * using the bufmap page and so there is no danger in this case.  in
  * this case, we wake up the device normally so that it may free the
@@ -731,77 +731,77 @@ int service_operation(struct pvfs2_kernel_op_s *op,
 #define handle_io_error()                                      \
 do {                                                           \
        if (!op_state_serviced(new_op)) {                       \
-               pvfs2_cancel_op_in_progress(new_op->tag);       \
+               orangefs_cancel_op_in_progress(new_op->tag);    \
                op_release(new_op);                             \
        } else {                                                \
                wake_up_daemon_for_return(new_op);              \
        }                                                       \
        new_op = NULL;                                          \
-       pvfs_bufmap_put(bufmap, buffer_index);                          \
+       orangefs_bufmap_put(bufmap, buffer_index);                              \
        buffer_index = -1;                                      \
 } while (0)
 
 #define get_interruptible_flag(inode) \
-       ((PVFS2_SB(inode->i_sb)->flags & PVFS2_OPT_INTR) ? \
-               PVFS2_OP_INTERRUPTIBLE : 0)
+       ((ORANGEFS_SB(inode->i_sb)->flags & ORANGEFS_OPT_INTR) ? \
+               ORANGEFS_OP_INTERRUPTIBLE : 0)
 
-#define add_pvfs2_sb(sb)                                               \
+#define add_orangefs_sb(sb)                                            \
 do {                                                                   \
        gossip_debug(GOSSIP_SUPER_DEBUG,                                \
-                    "Adding SB %p to pvfs2 superblocks\n",             \
-                    PVFS2_SB(sb));                                     \
-       spin_lock(&pvfs2_superblocks_lock);                             \
-       list_add_tail(&PVFS2_SB(sb)->list, &pvfs2_superblocks);         \
-       spin_unlock(&pvfs2_superblocks_lock); \
+                    "Adding SB %p to orangefs superblocks\n",          \
+                    ORANGEFS_SB(sb));                                  \
+       spin_lock(&orangefs_superblocks_lock);                          \
+       list_add_tail(&ORANGEFS_SB(sb)->list, &orangefs_superblocks);           \
+       spin_unlock(&orangefs_superblocks_lock); \
 } while (0)
 
-#define remove_pvfs2_sb(sb)                                            \
+#define remove_orangefs_sb(sb)                                         \
 do {                                                                   \
        struct list_head *tmp = NULL;                                   \
        struct list_head *tmp_safe = NULL;                              \
-       struct pvfs2_sb_info_s *pvfs2_sb = NULL;                        \
+       struct orangefs_sb_info_s *orangefs_sb = NULL;                  \
                                                                        \
-       spin_lock(&pvfs2_superblocks_lock);                             \
-       list_for_each_safe(tmp, tmp_safe, &pvfs2_superblocks) {         \
-               pvfs2_sb = list_entry(tmp,                              \
-                                     struct pvfs2_sb_info_s,           \
+       spin_lock(&orangefs_superblocks_lock);                          \
+       list_for_each_safe(tmp, tmp_safe, &orangefs_superblocks) {              \
+               orangefs_sb = list_entry(tmp,                           \
+                                     struct orangefs_sb_info_s,                \
                                      list);                            \
-               if (pvfs2_sb && (pvfs2_sb->sb == sb)) {                 \
+               if (orangefs_sb && (orangefs_sb->sb == sb)) {                   \
                        gossip_debug(GOSSIP_SUPER_DEBUG,                \
-                           "Removing SB %p from pvfs2 superblocks\n",  \
-                       pvfs2_sb);                                      \
-                       list_del(&pvfs2_sb->list);                      \
+                           "Removing SB %p from orangefs superblocks\n",       \
+                       orangefs_sb);                                   \
+                       list_del(&orangefs_sb->list);                   \
                        break;                                          \
                }                                                       \
        }                                                               \
-       spin_unlock(&pvfs2_superblocks_lock);                           \
+       spin_unlock(&orangefs_superblocks_lock);                                \
 } while (0)
 
-#define pvfs2_lock_inode(inode) spin_lock(&inode->i_lock)
-#define pvfs2_unlock_inode(inode) spin_unlock(&inode->i_lock)
+#define orangefs_lock_inode(inode) spin_lock(&inode->i_lock)
+#define orangefs_unlock_inode(inode) spin_unlock(&inode->i_lock)
 
 #define fill_default_sys_attrs(sys_attr, type, mode)                   \
 do {                                                                   \
        sys_attr.owner = from_kuid(current_user_ns(), current_fsuid()); \
        sys_attr.group = from_kgid(current_user_ns(), current_fsgid()); \
        sys_attr.size = 0;                                              \
-       sys_attr.perms = PVFS_util_translate_mode(mode);                \
+       sys_attr.perms = ORANGEFS_util_translate_mode(mode);            \
        sys_attr.objtype = type;                                        \
-       sys_attr.mask = PVFS_ATTR_SYS_ALL_SETABLE;                      \
+       sys_attr.mask = ORANGEFS_ATTR_SYS_ALL_SETABLE;                  \
 } while (0)
 
-#define pvfs2_inode_lock(__i)  mutex_lock(&(__i)->i_mutex)
+#define orangefs_inode_lock(__i)  mutex_lock(&(__i)->i_mutex)
 
-#define pvfs2_inode_unlock(__i) mutex_unlock(&(__i)->i_mutex)
+#define orangefs_inode_unlock(__i) mutex_unlock(&(__i)->i_mutex)
 
-static inline void pvfs2_i_size_write(struct inode *inode, loff_t i_size)
+static inline void orangefs_i_size_write(struct inode *inode, loff_t i_size)
 {
 #if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-       pvfs2_inode_lock(inode);
+       ornagefs_inode_lock(inode);
 #endif
        i_size_write(inode, i_size);
 #if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-       pvfs2_inode_unlock(inode);
+       orangefs_inode_unlock(inode);
 #endif
 }
 
@@ -816,4 +816,4 @@ static inline unsigned int diff(struct timeval *end, struct timeval *begin)
        return (end->tv_sec * 1000000) + end->tv_usec;
 }
 
-#endif /* __PVFS2KERNEL_H */
+#endif /* __ORANGEFSKERNEL_H */
This page took 0.041183 seconds and 5 git commands to generate.