diff options
author | Yi Liu <yi9@clemson.edu> | 2015-11-24 15:12:14 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-12-03 14:45:44 -0500 |
commit | 8bb8aefd5afb54a25a002feb4ec70011812d06a0 (patch) | |
tree | 08ca295ca2541c889e2805f92ae0aa699b0a13df | |
parent | 555fa0fa618b846c5b38406347b7d53ace320ac6 (diff) | |
download | linux-8bb8aefd5afb54a25a002feb4ec70011812d06a0.tar.gz linux-8bb8aefd5afb54a25a002feb4ec70011812d06a0.tar.bz2 linux-8bb8aefd5afb54a25a002feb4ec70011812d06a0.zip |
OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.
OrangeFS was formerly known as PVFS2 and retains the name in many places.
I leave the device /dev/pvfs2-req since this affects userspace.
I leave the filesystem type pvfs2 since this affects userspace. Further
the OrangeFS sysint library reads fstab for an entry of type pvfs2
independently of kernel mounts.
I leave extended attribute keys user.pvfs2 and system.pvfs2 as the
sysint library understands these.
I leave references to userspace binaries still named pvfs2.
I leave the filenames.
Signed-off-by: Yi Liu <yi9@clemson.edu>
[martin@omnibond.com: clairify above constraints and merge]
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r-- | fs/orangefs/acl.c | 42 | ||||
-rw-r--r-- | fs/orangefs/dcache.c | 24 | ||||
-rw-r--r-- | fs/orangefs/devpvfs2-req.c | 256 | ||||
-rw-r--r-- | fs/orangefs/dir.c | 86 | ||||
-rw-r--r-- | fs/orangefs/downcall.h | 84 | ||||
-rw-r--r-- | fs/orangefs/file.c | 208 | ||||
-rw-r--r-- | fs/orangefs/inode.c | 176 | ||||
-rw-r--r-- | fs/orangefs/namei.c | 134 | ||||
-rw-r--r-- | fs/orangefs/protocol.h | 308 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-bufmap.c | 168 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-bufmap.h | 40 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-cache.c | 122 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-debug.h | 18 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-debugfs.c | 48 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-debugfs.h | 6 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-dev-proto.h | 68 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-kernel.h | 402 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-mod.c | 106 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-sysfs.c | 108 | ||||
-rw-r--r-- | fs/orangefs/pvfs2-utils.c | 336 | ||||
-rw-r--r-- | fs/orangefs/super.c | 280 | ||||
-rw-r--r-- | fs/orangefs/symlink.c | 14 | ||||
-rw-r--r-- | fs/orangefs/upcall.h | 262 | ||||
-rw-r--r-- | fs/orangefs/waitqueue.c | 70 | ||||
-rw-r--r-- | fs/orangefs/xattr.c | 204 |
25 files changed, 1785 insertions, 1785 deletions
diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c index e462b81a3ba1..5e27d5fcb6bf 100644 --- a/fs/orangefs/acl.c +++ b/fs/orangefs/acl.c @@ -10,7 +10,7 @@ #include <linux/posix_acl_xattr.h> #include <linux/fs_struct.h> -struct posix_acl *pvfs2_get_acl(struct inode *inode, int type) +struct posix_acl *orangefs_get_acl(struct inode *inode, int type) { struct posix_acl *acl; int ret; @@ -18,23 +18,23 @@ struct posix_acl *pvfs2_get_acl(struct inode *inode, int type) switch (type) { case ACL_TYPE_ACCESS: - key = PVFS2_XATTR_NAME_ACL_ACCESS; + key = ORANGEFS_XATTR_NAME_ACL_ACCESS; break; case ACL_TYPE_DEFAULT: - key = PVFS2_XATTR_NAME_ACL_DEFAULT; + key = ORANGEFS_XATTR_NAME_ACL_DEFAULT; break; default: - gossip_err("pvfs2_get_acl: bogus value of type %d\n", type); + gossip_err("orangefs_get_acl: bogus value of type %d\n", type); return ERR_PTR(-EINVAL); } /* * Rather than incurring a network call just to determine the exact * length of the attribute, I just allocate a max length to save on * the network call. Conceivably, we could pass NULL to - * pvfs2_inode_getxattr() to probe the length of the value, but + * orangefs_inode_getxattr() to probe the length of the value, but * I don't do that for now. */ - value = kmalloc(PVFS_MAX_XATTR_VALUELEN, GFP_KERNEL); + value = kmalloc(ORANGEFS_MAX_XATTR_VALUELEN, GFP_KERNEL); if (value == NULL) return ERR_PTR(-ENOMEM); @@ -43,11 +43,11 @@ struct posix_acl *pvfs2_get_acl(struct inode *inode, int type) get_khandle_from_ino(inode), key, type); - ret = pvfs2_inode_getxattr(inode, + ret = orangefs_inode_getxattr(inode, "", key, value, - PVFS_MAX_XATTR_VALUELEN); + ORANGEFS_MAX_XATTR_VALUELEN); /* if the key exists, convert it to an in-memory rep */ if (ret > 0) { acl = posix_acl_from_xattr(&init_user_ns, value, ret); @@ -64,9 +64,9 @@ struct posix_acl *pvfs2_get_acl(struct inode *inode, int type) return acl; } -int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) +int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) { - struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode); + struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode); int error = 0; void *value = NULL; size_t size = 0; @@ -74,7 +74,7 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) switch (type) { case ACL_TYPE_ACCESS: - name = PVFS2_XATTR_NAME_ACL_ACCESS; + name = ORANGEFS_XATTR_NAME_ACL_ACCESS; if (acl) { umode_t mode = inode->i_mode; /* @@ -90,7 +90,7 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) } if (inode->i_mode != mode) - SetModeFlag(pvfs2_inode); + SetModeFlag(orangefs_inode); inode->i_mode = mode; mark_inode_dirty_sync(inode); if (error == 0) @@ -98,7 +98,7 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) } break; case ACL_TYPE_DEFAULT: - name = PVFS2_XATTR_NAME_ACL_DEFAULT; + name = ORANGEFS_XATTR_NAME_ACL_DEFAULT; break; default: gossip_err("%s: invalid type %d!\n", __func__, type); @@ -131,7 +131,7 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) * will xlate to a removexattr. However, we don't want removexattr * complain if attributes does not exist. */ - error = pvfs2_inode_setxattr(inode, "", name, value, size, 0); + error = orangefs_inode_setxattr(inode, "", name, value, size, 0); out: kfree(value); @@ -140,35 +140,35 @@ out: return error; } -int pvfs2_init_acl(struct inode *inode, struct inode *dir) +int orangefs_init_acl(struct inode *inode, struct inode *dir) { - struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode); + struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode); struct posix_acl *default_acl, *acl; umode_t mode = inode->i_mode; int error = 0; - ClearModeFlag(pvfs2_inode); + ClearModeFlag(orangefs_inode); error = posix_acl_create(dir, &mode, &default_acl, &acl); if (error) return error; if (default_acl) { - error = pvfs2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); + error = orangefs_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); posix_acl_release(default_acl); } if (acl) { if (!error) - error = pvfs2_set_acl(inode, acl, ACL_TYPE_ACCESS); + error = orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS); posix_acl_release(acl); } /* If mode of the inode was changed, then do a forcible ->setattr */ if (mode != inode->i_mode) { - SetModeFlag(pvfs2_inode); + SetModeFlag(orangefs_inode); inode->i_mode = mode; - pvfs2_flush_inode(inode); + orangefs_flush_inode(inode); } return error; diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index 9466b179bf24..12c916fa4c7f 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -12,27 +12,27 @@ #include "pvfs2-kernel.h" /* Returns 1 if dentry can still be trusted, else 0. */ -static int pvfs2_revalidate_lookup(struct dentry *dentry) +static int orangefs_revalidate_lookup(struct dentry *dentry) { struct dentry *parent_dentry = dget_parent(dentry); struct inode *parent_inode = parent_dentry->d_inode; - struct pvfs2_inode_s *parent = PVFS2_I(parent_inode); + struct orangefs_inode_s *parent = ORANGEFS_I(parent_inode); struct inode *inode = dentry->d_inode; - struct pvfs2_kernel_op_s *new_op; + struct orangefs_kernel_op_s *new_op; int ret = 0; int err = 0; gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__); - new_op = op_alloc(PVFS2_VFS_OP_LOOKUP); + new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP); if (!new_op) goto out_put_parent; - new_op->upcall.req.lookup.sym_follow = PVFS2_LOOKUP_LINK_NO_FOLLOW; + new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW; new_op->upcall.req.lookup.parent_refn = parent->refn; strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, - PVFS2_NAME_LEN); + ORANGEFS_NAME_LEN); gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d interrupt flag [%d]\n", @@ -41,7 +41,7 @@ static int pvfs2_revalidate_lookup(struct dentry *dentry) __LINE__, get_interruptible_flag(parent_inode)); - err = service_operation(new_op, "pvfs2_lookup", + err = service_operation(new_op, "orangefs_lookup", get_interruptible_flag(parent_inode)); if (err) goto out_drop; @@ -79,7 +79,7 @@ out_drop: * * Should return 1 if dentry can still be trusted, else 0 */ -static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags) +static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) { struct inode *inode; int ret = 0; @@ -105,7 +105,7 @@ static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags) * exists, but is still in the expected place in the name space */ if (!is_root_handle(inode)) { - if (!pvfs2_revalidate_lookup(dentry)) + if (!orangefs_revalidate_lookup(dentry)) goto invalid_exit; } else { gossip_debug(GOSSIP_DCACHE_DEBUG, @@ -119,7 +119,7 @@ static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags) __func__, inode, get_khandle_from_ino(inode)); - ret = pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_ALL_NOHINT); + ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT); gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: getattr %s (ret = %d), returning %s for dentry i_count=%d\n", __func__, @@ -137,6 +137,6 @@ invalid_exit: return 0; } -const struct dentry_operations pvfs2_dentry_operations = { - .d_revalidate = pvfs2_d_revalidate, +const struct dentry_operations orangefs_dentry_operations = { + .d_revalidate = orangefs_d_revalidate, }; diff --git a/fs/orangefs/devpvfs2-req.c b/fs/orangefs/devpvfs2-req.c index e37b6479a6a1..e18149f0975b 100644 --- a/fs/orangefs/devpvfs2-req.c +++ b/fs/orangefs/devpvfs2-req.c @@ -22,14 +22,14 @@ static int open_access_count; #define DUMP_DEVICE_ERROR() \ do { \ gossip_err("*****************************************************\n");\ - gossip_err("PVFS2 Device Error: You cannot open the device file "); \ + gossip_err("ORANGEFS Device Error: You cannot open the device file "); \ gossip_err("\n/dev/%s more than once. Please make sure that\nthere " \ - "are no ", PVFS2_REQDEVICE_NAME); \ + "are no ", ORANGEFS_REQDEVICE_NAME); \ gossip_err("instances of a program using this device\ncurrently " \ "running. (You must verify this!)\n"); \ gossip_err("For example, you can use the lsof program as follows:\n");\ gossip_err("'lsof | grep %s' (run this as root)\n", \ - PVFS2_REQDEVICE_NAME); \ + ORANGEFS_REQDEVICE_NAME); \ gossip_err(" open_access_count = %d\n", open_access_count); \ gossip_err("*****************************************************\n");\ } while (0) @@ -39,7 +39,7 @@ static int hash_func(__u64 tag, int table_size) return do_div(tag, (unsigned int)table_size); } -static void pvfs2_devreq_add_op(struct pvfs2_kernel_op_s *op) +static void orangefs_devreq_add_op(struct orangefs_kernel_op_s *op) { int index = hash_func(op->tag, hash_table_size); @@ -48,9 +48,9 @@ static void pvfs2_devreq_add_op(struct pvfs2_kernel_op_s *op) spin_unlock(&htable_ops_in_progress_lock); } -static struct pvfs2_kernel_op_s *pvfs2_devreq_remove_op(__u64 tag) +static struct orangefs_kernel_op_s *orangefs_devreq_remove_op(__u64 tag) { - struct pvfs2_kernel_op_s *op, *next; + struct orangefs_kernel_op_s *op, *next; int index; index = hash_func(tag, hash_table_size); @@ -71,12 +71,12 @@ static struct pvfs2_kernel_op_s *pvfs2_devreq_remove_op(__u64 tag) return NULL; } -static int pvfs2_devreq_open(struct inode *inode, struct file *file) +static int orangefs_devreq_open(struct inode *inode, struct file *file) { int ret = -EINVAL; if (!(file->f_flags & O_NONBLOCK)) { - gossip_err("pvfs2: device cannot be opened in blocking mode\n"); + gossip_err("orangefs: device cannot be opened in blocking mode\n"); goto out; } ret = -EACCES; @@ -100,14 +100,14 @@ out: return ret; } -static ssize_t pvfs2_devreq_read(struct file *file, +static ssize_t orangefs_devreq_read(struct file *file, char __user *buf, size_t count, loff_t *offset) { - struct pvfs2_kernel_op_s *op, *temp; - __s32 proto_ver = PVFS_KERNEL_PROTO_VERSION; - static __s32 magic = PVFS2_DEVREQ_MAGIC; - struct pvfs2_kernel_op_s *cur_op = NULL; + struct orangefs_kernel_op_s *op, *temp; + __s32 proto_ver = ORANGEFS_KERNEL_PROTO_VERSION; + static __s32 magic = ORANGEFS_DEVREQ_MAGIC; + struct orangefs_kernel_op_s *cur_op = NULL; unsigned long ret; /* We do not support blocking IO. */ @@ -126,14 +126,14 @@ static ssize_t pvfs2_devreq_read(struct file *file, } /* Get next op (if any) from top of list. */ - spin_lock(&pvfs2_request_list_lock); - list_for_each_entry_safe(op, temp, &pvfs2_request_list, list) { + spin_lock(&orangefs_request_list_lock); + list_for_each_entry_safe(op, temp, &orangefs_request_list, list) { __s32 fsid; /* This lock is held past the end of the loop when we break. */ spin_lock(&op->lock); fsid = fsid_of_op(op); - if (fsid != PVFS_FS_ID_NULL) { + if (fsid != ORANGEFS_FS_ID_NULL) { int ret; /* Skip ops whose filesystem needs to be mounted. */ ret = fs_mount_pending(fsid); @@ -147,8 +147,8 @@ static ssize_t pvfs2_devreq_read(struct file *file, * it is being mounted. */ /* XXX: is there a better way to detect this? */ } else if (ret == -1 && - !(op->upcall.type == PVFS2_VFS_OP_FS_MOUNT || - op->upcall.type == PVFS2_VFS_OP_GETATTR)) { + !(op->upcall.type == ORANGEFS_VFS_OP_FS_MOUNT || + op->upcall.type == ORANGEFS_VFS_OP_GETATTR)) { gossip_debug(GOSSIP_DEV_DEBUG, "orangefs: skipping op tag %llu %s\n", llu(op->tag), get_opname_string(op)); @@ -173,7 +173,7 @@ static ssize_t pvfs2_devreq_read(struct file *file, * found an op and must ask the client to try again later. */ if (!cur_op) { - spin_unlock(&pvfs2_request_list_lock); + spin_unlock(&orangefs_request_list_lock); return -EAGAIN; } @@ -188,7 +188,7 @@ static ssize_t pvfs2_devreq_read(struct file *file, gossip_err("orangefs: ERROR: Current op already queued.\n"); list_del(&cur_op->list); spin_unlock(&cur_op->lock); - spin_unlock(&pvfs2_request_list_lock); + spin_unlock(&orangefs_request_list_lock); return -EAGAIN; } @@ -199,8 +199,8 @@ static ssize_t pvfs2_devreq_read(struct file *file, set_op_state_inprogress(cur_op); list_del(&cur_op->list); - spin_unlock(&pvfs2_request_list_lock); - pvfs2_devreq_add_op(cur_op); + spin_unlock(&orangefs_request_list_lock); + orangefs_devreq_add_op(cur_op); spin_unlock(&cur_op->lock); /* Push the upcall out. */ @@ -214,7 +214,7 @@ static ssize_t pvfs2_devreq_read(struct file *file, if (ret != 0) goto error; ret = copy_to_user(buf+2*sizeof(__s32)+sizeof(__u64), &cur_op->upcall, - sizeof(struct pvfs2_upcall_s)); + sizeof(struct orangefs_upcall_s)); if (ret != 0) goto error; @@ -227,23 +227,23 @@ error: * device is released. */ gossip_err("orangefs: Failed to copy data to user space\n"); - spin_lock(&pvfs2_request_list_lock); + spin_lock(&orangefs_request_list_lock); spin_lock(&cur_op->lock); set_op_state_waiting(cur_op); - pvfs2_devreq_remove_op(cur_op->tag); - list_add(&cur_op->list, &pvfs2_request_list); + orangefs_devreq_remove_op(cur_op->tag); + list_add(&cur_op->list, &orangefs_request_list); spin_unlock(&cur_op->lock); - spin_unlock(&pvfs2_request_list_lock); + spin_unlock(&orangefs_request_list_lock); return -EFAULT; } /* Function for writev() callers into the device */ -static ssize_t pvfs2_devreq_writev(struct file *file, +static ssize_t orangefs_devreq_writev(struct file *file, const struct iovec *iov, size_t count, loff_t *offset) { - struct pvfs2_kernel_op_s *op = NULL; + struct orangefs_kernel_op_s *op = NULL; void *buffer = NULL; void *ptr = NULL; unsigned long i = 0; @@ -301,7 +301,7 @@ static ssize_t pvfs2_devreq_writev(struct file *file, tag = *((__u64 *) ptr); ptr += sizeof(__u64); - if (magic != PVFS2_DEVREQ_MAGIC) { + if (magic != ORANGEFS_DEVREQ_MAGIC) { gossip_err("Error: Device magic number does not match.\n"); dev_req_release(buffer); return -EPROTO; @@ -311,17 +311,17 @@ static ssize_t pvfs2_devreq_writev(struct file *file, * proto_ver = 20902 for 2.9.2 */ - op = pvfs2_devreq_remove_op(tag); + op = orangefs_devreq_remove_op(tag); if (op) { /* Increase ref count! */ get_op(op); /* cut off magic and tag from payload size */ payload_size -= (2 * sizeof(__s32) + sizeof(__u64)); - if (payload_size <= sizeof(struct pvfs2_downcall_s)) + if (payload_size <= sizeof(struct orangefs_downcall_s)) /* copy the passed in downcall into the op */ memcpy(&op->downcall, ptr, - sizeof(struct pvfs2_downcall_s)); + sizeof(struct orangefs_downcall_s)); else gossip_debug(GOSSIP_DEV_DEBUG, "writev: Ignoring %d bytes\n", @@ -392,8 +392,8 @@ static ssize_t pvfs2_devreq_writev(struct file *file, * application reading/writing this device to return until * the buffers are done being used. */ - if (op->upcall.type == PVFS2_VFS_OP_FILE_IO && - op->upcall.req.io.async_vfs_io == PVFS_VFS_SYNC_IO) { + if (op->upcall.type == ORANGEFS_VFS_OP_FILE_IO && + op->upcall.req.io.async_vfs_io == ORANGEFS_VFS_SYNC_IO) { int timed_out = 0; DECLARE_WAITQUEUE(wait_entry, current); @@ -473,10 +473,10 @@ static ssize_t pvfs2_devreq_writev(struct file *file, return total_returned_size; } -static ssize_t pvfs2_devreq_write_iter(struct kiocb *iocb, +static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, struct iov_iter *iter) { - return pvfs2_devreq_writev(iocb->ki_filp, + return orangefs_devreq_writev(iocb->ki_filp, iter->iov, iter->nr_segs, &iocb->ki_pos); @@ -486,15 +486,15 @@ static ssize_t pvfs2_devreq_write_iter(struct kiocb *iocb, static int mark_all_pending_mounts(void) { int unmounted = 1; - struct pvfs2_sb_info_s *pvfs2_sb = NULL; + struct orangefs_sb_info_s *orangefs_sb = NULL; - spin_lock(&pvfs2_superblocks_lock); - list_for_each_entry(pvfs2_sb, &pvfs2_superblocks, list) { + spin_lock(&orangefs_superblocks_lock); + list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) { /* All of these file system require a remount */ - pvfs2_sb->mount_pending = 1; + orangefs_sb->mount_pending = 1; unmounted = 0; } - spin_unlock(&pvfs2_superblocks_lock); + spin_unlock(&orangefs_superblocks_lock); return unmounted; } @@ -507,16 +507,16 @@ static int mark_all_pending_mounts(void) int fs_mount_pending(__s32 fsid) { int mount_pending = -1; - struct pvfs2_sb_info_s *pvfs2_sb = NULL; + struct orangefs_sb_info_s *orangefs_sb = NULL; - spin_lock(&pvfs2_superblocks_lock); - list_for_each_entry(pvfs2_sb, &pvfs2_superblocks, list) { - if (pvfs2_sb->fs_id == fsid) { - mount_pending = pvfs2_sb->mount_pending; + spin_lock(&orangefs_superblocks_lock); + list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) { + if (orangefs_sb->fs_id == fsid) { + mount_pending = orangefs_sb->mount_pending; break; } } - spin_unlock(&pvfs2_superblocks_lock); + spin_unlock(&orangefs_superblocks_lock); return mount_pending; } @@ -525,10 +525,10 @@ int fs_mount_pending(__s32 fsid) * Using the open_access_count variable, we enforce a reference count * on this file so that it can be opened by only one process at a time. * the devreq_mutex is used to make sure all i/o has completed - * before we call pvfs_bufmap_finalize, and similar such tricky + * before we call orangefs_bufmap_finalize, and similar such tricky * situations */ -static int pvfs2_devreq_release(struct inode *inode, struct file *file) +static int orangefs_devreq_release(struct inode *inode, struct file *file) { int unmounted = 0; @@ -537,12 +537,12 @@ static int pvfs2_devreq_release(struct inode *inode, struct file *file) __func__); mutex_lock(&devreq_mutex); - pvfs_bufmap_finalize(); + orangefs_bufmap_finalize(); open_access_count--; unmounted = mark_all_pending_mounts(); - gossip_debug(GOSSIP_DEV_DEBUG, "PVFS2 Device Close: Filesystem(s) %s\n", + gossip_debug(GOSSIP_DEV_DEBUG, "ORANGEFS Device Close: Filesystem(s) %s\n", (unmounted ? "UNMOUNTED" : "MOUNTED")); mutex_unlock(&devreq_mutex); @@ -578,17 +578,17 @@ int is_daemon_in_service(void) static inline long check_ioctl_command(unsigned int command) { /* Check for valid ioctl codes */ - if (_IOC_TYPE(command) != PVFS_DEV_MAGIC) { + if (_IOC_TYPE(command) != ORANGEFS_DEV_MAGIC) { gossip_err("device ioctl magic numbers don't match! Did you rebuild pvfs2-client-core/libpvfs2? [cmd %x, magic %x != %x]\n", command, _IOC_TYPE(command), - PVFS_DEV_MAGIC); + ORANGEFS_DEV_MAGIC); return -EINVAL; } /* and valid ioctl commands */ - if (_IOC_NR(command) >= PVFS_DEV_MAXNR || _IOC_NR(command) <= 0) { + if (_IOC_NR(command) >= ORANGEFS_DEV_MAXNR || _IOC_NR(command) <= 0) { gossip_err("Invalid ioctl command number [%d >= %d]\n", - _IOC_NR(command), PVFS_DEV_MAXNR); + _IOC_NR(command), ORANGEFS_DEV_MAXNR); return -ENOIOCTLCMD; } return 0; @@ -596,46 +596,46 @@ static inline long check_ioctl_command(unsigned int command) static long dispatch_ioctl_command(unsigned int command, unsigned long arg) { - static __s32 magic = PVFS2_DEVREQ_MAGIC; + static __s32 magic = ORANGEFS_DEVREQ_MAGIC; static __s32 max_up_size = MAX_ALIGNED_DEV_REQ_UPSIZE; static __s32 max_down_size = MAX_ALIGNED_DEV_REQ_DOWNSIZE; - struct PVFS_dev_map_desc user_desc; + struct ORANGEFS_dev_map_desc user_desc; int ret = 0; struct dev_mask_info_s mask_info = { 0 }; struct dev_mask2_info_s mask2_info = { 0, 0 }; int upstream_kmod = 1; struct list_head *tmp = NULL; - struct pvfs2_sb_info_s *pvfs2_sb = NULL; + struct orangefs_sb_info_s *orangefs_sb = NULL; /* mtmoore: add locking here */ switch (command) { - case PVFS_DEV_GET_MAGIC: + case ORANGEFS_DEV_GET_MAGIC: return ((put_user(magic, (__s32 __user *) arg) == -EFAULT) ? -EIO : 0); - case PVFS_DEV_GET_MAX_UPSIZE: + case ORANGEFS_DEV_GET_MAX_UPSIZE: return ((put_user(max_up_size, (__s32 __user *) arg) == -EFAULT) ? -EIO : 0); - case PVFS_DEV_GET_MAX_DOWNSIZE: + case ORANGEFS_DEV_GET_MAX_DOWNSIZE: return ((put_user(max_down_size, (__s32 __user *) arg) == -EFAULT) ? -EIO : 0); - case PVFS_DEV_MAP: + case ORANGEFS_DEV_MAP: ret = copy_from_user(&user_desc, - (struct PVFS_dev_map_desc __user *) + (struct ORANGEFS_dev_map_desc __user *) arg, - sizeof(struct PVFS_dev_map_desc)); - return ret ? -EIO : pvfs_bufmap_initialize(&user_desc); - case PVFS_DEV_REMOUNT_ALL: + sizeof(struct ORANGEFS_dev_map_desc)); + return ret ? -EIO : orangefs_bufmap_initialize(&user_desc); + case ORANGEFS_DEV_REMOUNT_ALL: gossip_debug(GOSSIP_DEV_DEBUG, - "pvfs2_devreq_ioctl: got PVFS_DEV_REMOUNT_ALL\n"); + "orangefs_devreq_ioctl: got ORANGEFS_DEV_REMOUNT_ALL\n"); /* - * remount all mounted pvfs2 volumes to regain the lost + * remount all mounted orangefs volumes to regain the lost * dynamic mount tables (if any) -- NOTE: this is done * without keeping the superblock list locked due to the * upcall/downcall waiting. also, the request semaphore is @@ -647,30 +647,30 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) if (ret < 0) return ret; gossip_debug(GOSSIP_DEV_DEBUG, - "pvfs2_devreq_ioctl: priority remount in progress\n"); - list_for_each(tmp, &pvfs2_superblocks) { - pvfs2_sb = - list_entry(tmp, struct pvfs2_sb_info_s, list); - if (pvfs2_sb && (pvfs2_sb->sb)) { + "orangefs_devreq_ioctl: priority remount in progress\n"); + list_for_each(tmp, &orangefs_superblocks) { + orangefs_sb = + list_entry(tmp, struct orangefs_sb_info_s, list); + if (orangefs_sb && (orangefs_sb->sb)) { gossip_debug(GOSSIP_DEV_DEBUG, "Remounting SB %p\n", - pvfs2_sb); + orangefs_sb); - ret = pvfs2_remount(pvfs2_sb->sb); + ret = orangefs_remount(orangefs_sb->sb); if (ret) { gossip_debug(GOSSIP_DEV_DEBUG, "SB %p remount failed\n", - pvfs2_sb); + orangefs_sb); break; } } } gossip_debug(GOSSIP_DEV_DEBUG, - "pvfs2_devreq_ioctl: priority remount complete\n"); + "orangefs_devreq_ioctl: priority remount complete\n"); mutex_unlock(&request_mutex); return ret; - case PVFS_DEV_UPSTREAM: + case ORANGEFS_DEV_UPSTREAM: ret = copy_to_user((void __user *)arg, &upstream_kmod, sizeof(upstream_kmod)); @@ -680,7 +680,7 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) else return ret; - case PVFS_DEV_CLIENT_MASK: + case ORANGEFS_DEV_CLIENT_MASK: ret = copy_from_user(&mask2_info, (void __user *)arg, sizeof(struct dev_mask2_info_s)); @@ -699,13 +699,13 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) return ret; - case PVFS_DEV_CLIENT_STRING: + case ORANGEFS_DEV_CLIENT_STRING: ret = copy_from_user(&client_debug_array_string, (void __user *)arg, - PVFS2_MAX_DEBUG_STRING_LEN); + ORANGEFS_MAX_DEBUG_STRING_LEN); if (ret != 0) { pr_info("%s: " - "PVFS_DEV_CLIENT_STRING: copy_from_user failed" + "ORANGEFS_DEV_CLIENT_STRING: copy_from_user failed" "\n", __func__); return -EIO; @@ -753,13 +753,13 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) debugfs_remove(client_debug_dentry); - pvfs2_client_debug_init(); + orangefs_client_debug_init(); help_string_initialized++; return ret; - case PVFS_DEV_DEBUG: + case ORANGEFS_DEV_DEBUG: ret = copy_from_user(&mask_info, (void __user *)arg, sizeof(mask_info)); @@ -774,21 +774,21 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) * the kernel debug mask was set when the * kernel module was loaded; don't override * it if the client-core was started without - * a value for PVFS2_KMODMASK. + * a value for ORANGEFS_KMODMASK. */ return 0; } debug_mask_to_string(&mask_info.mask_value, mask_info.mask_type); gossip_debug_mask = mask_info.mask_value; - pr_info("PVFS: kernel debug mask has been modified to " + pr_info("ORANGEFS: kernel debug mask has been modified to " ":%s: :%llx:\n", kernel_debug_string, (unsigned long long)gossip_debug_mask); } else if (mask_info.mask_type == CLIENT_MASK) { debug_mask_to_string(&mask_info.mask_value, mask_info.mask_type); - pr_info("PVFS: client debug mask has been modified to" + pr_info("ORANGEFS: client debug mask has been modified to" ":%s: :%llx:\n", client_debug_string, llu(mask_info.mask_value)); @@ -805,7 +805,7 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg) return -ENOIOCTLCMD; } -static long pvfs2_devreq_ioctl(struct file *file, +static long orangefs_devreq_ioctl(struct file *file, unsigned int command, unsigned long arg) { long ret; @@ -820,8 +820,8 @@ static long pvfs2_devreq_ioctl(struct file *file, #ifdef CONFIG_COMPAT /* CONFIG_COMPAT is in .config */ -/* Compat structure for the PVFS_DEV_MAP ioctl */ -struct PVFS_dev_map_desc32 { +/* Compat structure for the ORANGEFS_DEV_MAP ioctl */ +struct ORANGEFS_dev_map_desc32 { compat_uptr_t ptr; __s32 total_size; __s32 size; @@ -830,12 +830,12 @@ struct PVFS_dev_map_desc32 { static unsigned long translate_dev_map26(unsigned long args, long *error) { - struct PVFS_dev_map_desc32 __user *p32 = (void __user *)args; + struct ORANGEFS_dev_map_desc32 __user *p32 = (void __user *)args; /* * Depending on the architecture, allocate some space on the * user-call-stack based on our expected layout. */ - struct PVFS_dev_map_desc __user *p = + struct ORANGEFS_dev_map_desc __user *p = compat_alloc_user_space(sizeof(*p)); compat_uptr_t addr; @@ -863,7 +863,7 @@ err: * 32 bit user-space apps' ioctl handlers when kernel modules * is compiled as a 64 bit one */ -static long pvfs2_devreq_compat_ioctl(struct file *filp, unsigned int cmd, +static long orangefs_devreq_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long args) { long ret; @@ -873,7 +873,7 @@ static long pvfs2_devreq_compat_ioctl(struct file *filp, unsigned int cmd, ret = check_ioctl_command(cmd); if (ret < 0) return ret; - if (cmd == PVFS_DEV_MAP) { + if (cmd == ORANGEFS_DEV_MAP) { /* * convert the arguments to what we expect internally * in kernel space @@ -896,89 +896,89 @@ static long pvfs2_devreq_compat_ioctl(struct file *filp, unsigned int cmd, * not noticed until we tried to compile on power pc... */ #if (defined(CONFIG_COMPAT) && !defined(HAVE_REGISTER_IOCTL32_CONVERSION)) || !defined(CONFIG_COMPAT) -static int pvfs2_ioctl32_init(void) +static int orangefs_ioctl32_init(void) { return 0; } -static void pvfs2_ioctl32_cleanup(void) +static void orangefs_ioctl32_cleanup(void) { return; } #endif /* the assigned character device major number */ -static int pvfs2_dev_major; +static int orangefs_dev_major; /* - * Initialize pvfs2 device specific state: + * Initialize orangefs device specific state: * Must be called at module load time only */ -int pvfs2_dev_init(void) +int orangefs_dev_init(void) { int ret; /* register the ioctl32 sub-system */ - ret = pvfs2_ioctl32_init(); + ret = orangefs_ioctl32_init(); if (ret < 0) return ret; - /* register pvfs2-req device */ - pvfs2_dev_major = register_chrdev(0, - PVFS2_REQDEVICE_NAME, - &pvfs2_devreq_file_operations); - if (pvfs2_dev_major < 0) { + /* register orangefs-req device */ + orangefs_dev_major = register_chrdev(0, + ORANGEFS_REQDEVICE_NAME, + &orangefs_devreq_file_operations); + if (orangefs_dev_major < 0) { gossip_debug(GOSSIP_DEV_DEBUG, |