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>
diff --git a/fs/orangefs/pvfs2-debugfs.c b/fs/orangefs/pvfs2-debugfs.c
index ba5bfef..315dc53 100644
--- a/fs/orangefs/pvfs2-debugfs.c
+++ b/fs/orangefs/pvfs2-debugfs.c
@@ -95,7 +95,7 @@
  * initialize kmod debug operations, create orangefs debugfs dir and
  * ORANGEFS_KMOD_DEBUG_HELP_FILE.
  */
-int pvfs2_debugfs_init(void)
+int orangefs_debugfs_init(void)
 {
 
 	int rc = -ENOMEM;
@@ -117,12 +117,12 @@
 
 out:
 	if (rc)
-		pvfs2_debugfs_cleanup();
+		orangefs_debugfs_cleanup();
 
 	return rc;
 }
 
-void pvfs2_debugfs_cleanup(void)
+void orangefs_debugfs_cleanup(void)
 {
 	debugfs_remove_recursive(debug_dir);
 }
@@ -196,7 +196,7 @@
 /*
  * initialize the kernel-debug file.
  */
-int pvfs2_kernel_debug_init(void)
+int orangefs_kernel_debug_init(void)
 {
 
 	int rc = -ENOMEM;
@@ -205,11 +205,11 @@
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG, "%s: start\n", __func__);
 
-	k_buffer = kzalloc(PVFS2_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
+	k_buffer = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
 	if (!k_buffer)
 		goto out;
 
-	if (strlen(kernel_debug_string) + 1 < PVFS2_MAX_DEBUG_STRING_LEN) {
+	if (strlen(kernel_debug_string) + 1 < ORANGEFS_MAX_DEBUG_STRING_LEN) {
 		strcpy(k_buffer, kernel_debug_string);
 		strcat(k_buffer, "\n");
 	} else {
@@ -233,7 +233,7 @@
 
 out:
 	if (rc)
-		pvfs2_debugfs_cleanup();
+		orangefs_debugfs_cleanup();
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG, "%s: rc:%d:\n", __func__, rc);
 	return rc;
@@ -242,7 +242,7 @@
 /*
  * initialize the client-debug file.
  */
-int pvfs2_client_debug_init(void)
+int orangefs_client_debug_init(void)
 {
 
 	int rc = -ENOMEM;
@@ -250,11 +250,11 @@
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG, "%s: start\n", __func__);
 
-	c_buffer = kzalloc(PVFS2_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
+	c_buffer = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
 	if (!c_buffer)
 		goto out;
 
-	if (strlen(client_debug_string) + 1 < PVFS2_MAX_DEBUG_STRING_LEN) {
+	if (strlen(client_debug_string) + 1 < ORANGEFS_MAX_DEBUG_STRING_LEN) {
 		strcpy(c_buffer, client_debug_string);
 		strcat(c_buffer, "\n");
 	} else {
@@ -278,7 +278,7 @@
 
 out:
 	if (rc)
-		pvfs2_debugfs_cleanup();
+		orangefs_debugfs_cleanup();
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG, "%s: rc:%d:\n", __func__, rc);
 	return rc;
@@ -320,7 +320,7 @@
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG, "orangefs_debug_read: start\n");
 
-	buf = kmalloc(PVFS2_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
+	buf = kmalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
 	if (!buf)
 		goto out;
 
@@ -349,7 +349,7 @@
 	int rc = -EFAULT;
 	size_t silly = 0;
 	char *debug_string;
-	struct pvfs2_kernel_op_s *new_op = NULL;
+	struct orangefs_kernel_op_s *new_op = NULL;
 	struct client_debug_mask c_mask = { NULL, 0, 0 };
 
 	gossip_debug(GOSSIP_DEBUGFS_DEBUG,
@@ -360,15 +360,15 @@
 	 * Thwart users who try to jamb a ridiculous number
 	 * of bytes into the debug file...
 	 */
-	if (count > PVFS2_MAX_DEBUG_STRING_LEN + 1) {
+	if (count > ORANGEFS_MAX_DEBUG_STRING_LEN + 1) {
 		silly = count;
-		count = PVFS2_MAX_DEBUG_STRING_LEN + 1;
+		count = ORANGEFS_MAX_DEBUG_STRING_LEN + 1;
 	}
 
-	buf = kmalloc(PVFS2_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
+	buf = kmalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
 	if (!buf)
 		goto out;
-	memset(buf, 0, PVFS2_MAX_DEBUG_STRING_LEN);
+	memset(buf, 0, ORANGEFS_MAX_DEBUG_STRING_LEN);
 
 	if (copy_from_user(buf, ubuf, count - 1)) {
 		gossip_debug(GOSSIP_DEBUGFS_DEBUG,
@@ -407,18 +407,18 @@
 		debug_mask_to_string(&c_mask, 1);
 		debug_string = client_debug_string;
 
-		new_op = op_alloc(PVFS2_VFS_OP_PARAM);
+		new_op = op_alloc(ORANGEFS_VFS_OP_PARAM);
 		if (!new_op) {
 			pr_info("%s: op_alloc failed!\n", __func__);
 			goto out;
 		}
 
 		new_op->upcall.req.param.op =
-			PVFS2_PARAM_REQUEST_OP_TWO_MASK_VALUES;
-		new_op->upcall.req.param.type = PVFS2_PARAM_REQUEST_SET;
+			ORANGEFS_PARAM_REQUEST_OP_TWO_MASK_VALUES;
+		new_op->upcall.req.param.type = ORANGEFS_PARAM_REQUEST_SET;
 		memset(new_op->upcall.req.param.s_value,
 		       0,
-		       PVFS2_MAX_DEBUG_STRING_LEN);
+		       ORANGEFS_MAX_DEBUG_STRING_LEN);
 		sprintf(new_op->upcall.req.param.s_value,
 			"%llx %llx\n",
 			c_mask.mask1,
@@ -426,8 +426,8 @@
 
 		/* service_operation returns 0 on success... */
 		rc = service_operation(new_op,
-				       "pvfs2_param",
-					PVFS2_OP_INTERRUPTIBLE);
+				       "orangefs_param",
+					ORANGEFS_OP_INTERRUPTIBLE);
 
 		if (rc)
 			gossip_debug(GOSSIP_DEBUGFS_DEBUG,
@@ -439,7 +439,7 @@
 	}
 
 	mutex_lock(&orangefs_debug_lock);
-	memset(file->f_inode->i_private, 0, PVFS2_MAX_DEBUG_STRING_LEN);
+	memset(file->f_inode->i_private, 0, ORANGEFS_MAX_DEBUG_STRING_LEN);
 	sprintf((char *)file->f_inode->i_private, "%s\n", debug_string);
 	mutex_unlock(&orangefs_debug_lock);