Skip to content

Commit 8bb8aef

Browse files
yi9hubcapsc
authored andcommitted
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>
1 parent 555fa0f commit 8bb8aef

25 files changed

Lines changed: 1785 additions & 1785 deletions

‎fs/orangefs/acl.c‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@
1010
#include <linux/posix_acl_xattr.h>
1111
#include <linux/fs_struct.h>
1212

13-
struct posix_acl *pvfs2_get_acl(struct inode *inode, int type)
13+
struct posix_acl *orangefs_get_acl(struct inode *inode, int type)
1414
{
1515
struct posix_acl *acl;
1616
int ret;
1717
char *key = NULL, *value = NULL;
1818

1919
switch (type) {
2020
case ACL_TYPE_ACCESS:
21-
key = PVFS2_XATTR_NAME_ACL_ACCESS;
21+
key = ORANGEFS_XATTR_NAME_ACL_ACCESS;
2222
break;
2323
case ACL_TYPE_DEFAULT:
24-
key = PVFS2_XATTR_NAME_ACL_DEFAULT;
24+
key = ORANGEFS_XATTR_NAME_ACL_DEFAULT;
2525
break;
2626
default:
27-
gossip_err("pvfs2_get_acl: bogus value of type %d\n", type);
27+
gossip_err("orangefs_get_acl: bogus value of type %d\n", type);
2828
return ERR_PTR(-EINVAL);
2929
}
3030
/*
3131
* Rather than incurring a network call just to determine the exact
3232
* length of the attribute, I just allocate a max length to save on
3333
* the network call. Conceivably, we could pass NULL to
34-
* pvfs2_inode_getxattr() to probe the length of the value, but
34+
* orangefs_inode_getxattr() to probe the length of the value, but
3535
* I don't do that for now.
3636
*/
37-
value = kmalloc(PVFS_MAX_XATTR_VALUELEN, GFP_KERNEL);
37+
value = kmalloc(ORANGEFS_MAX_XATTR_VALUELEN, GFP_KERNEL);
3838
if (value == NULL)
3939
return ERR_PTR(-ENOMEM);
4040

@@ -43,11 +43,11 @@ struct posix_acl *pvfs2_get_acl(struct inode *inode, int type)
4343
get_khandle_from_ino(inode),
4444
key,
4545
type);
46-
ret = pvfs2_inode_getxattr(inode,
46+
ret = orangefs_inode_getxattr(inode,
4747
"",
4848
key,
4949
value,
50-
PVFS_MAX_XATTR_VALUELEN);
50+
ORANGEFS_MAX_XATTR_VALUELEN);
5151
/* if the key exists, convert it to an in-memory rep */
5252
if (ret > 0) {
5353
acl = posix_acl_from_xattr(&init_user_ns, value, ret);
@@ -64,17 +64,17 @@ struct posix_acl *pvfs2_get_acl(struct inode *inode, int type)
6464
return acl;
6565
}
6666

67-
int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
67+
int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
6868
{
69-
struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode);
69+
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
7070
int error = 0;
7171
void *value = NULL;
7272
size_t size = 0;
7373
const char *name = NULL;
7474

7575
switch (type) {
7676
case ACL_TYPE_ACCESS:
77-
name = PVFS2_XATTR_NAME_ACL_ACCESS;
77+
name = ORANGEFS_XATTR_NAME_ACL_ACCESS;
7878
if (acl) {
7979
umode_t mode = inode->i_mode;
8080
/*
@@ -90,15 +90,15 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
9090
}
9191

9292
if (inode->i_mode != mode)
93-
SetModeFlag(pvfs2_inode);
93+
SetModeFlag(orangefs_inode);
9494
inode->i_mode = mode;
9595
mark_inode_dirty_sync(inode);
9696
if (error == 0)
9797
acl = NULL;
9898
}
9999
break;
100100
case ACL_TYPE_DEFAULT:
101-
name = PVFS2_XATTR_NAME_ACL_DEFAULT;
101+
name = ORANGEFS_XATTR_NAME_ACL_DEFAULT;
102102
break;
103103
default:
104104
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)
131131
* will xlate to a removexattr. However, we don't want removexattr
132132
* complain if attributes does not exist.
133133
*/
134-
error = pvfs2_inode_setxattr(inode, "", name, value, size, 0);
134+
error = orangefs_inode_setxattr(inode, "", name, value, size, 0);
135135

136136
out:
137137
kfree(value);
@@ -140,35 +140,35 @@ int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
140140
return error;
141141
}
142142

143-
int pvfs2_init_acl(struct inode *inode, struct inode *dir)
143+
int orangefs_init_acl(struct inode *inode, struct inode *dir)
144144
{
145-
struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode);
145+
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
146146
struct posix_acl *default_acl, *acl;
147147
umode_t mode = inode->i_mode;
148148
int error = 0;
149149

150-
ClearModeFlag(pvfs2_inode);
150+
ClearModeFlag(orangefs_inode);
151151

152152
error = posix_acl_create(dir, &mode, &default_acl, &acl);
153153
if (error)
154154
return error;
155155

156156
if (default_acl) {
157-
error = pvfs2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
157+
error = orangefs_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
158158
posix_acl_release(default_acl);
159159
}
160160

161161
if (acl) {
162162
if (!error)
163-
error = pvfs2_set_acl(inode, acl, ACL_TYPE_ACCESS);
163+
error = orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS);
164164
posix_acl_release(acl);
165165
}
166166

167167
/* If mode of the inode was changed, then do a forcible ->setattr */
168168
if (mode != inode->i_mode) {
169-
SetModeFlag(pvfs2_inode);
169+
SetModeFlag(orangefs_inode);
170170
inode->i_mode = mode;
171-
pvfs2_flush_inode(inode);
171+
orangefs_flush_inode(inode);
172172
}
173173

174174
return error;

‎fs/orangefs/dcache.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
#include "pvfs2-kernel.h"
1313

1414
/* Returns 1 if dentry can still be trusted, else 0. */
15-
static int pvfs2_revalidate_lookup(struct dentry *dentry)
15+
static int orangefs_revalidate_lookup(struct dentry *dentry)
1616
{
1717
struct dentry *parent_dentry = dget_parent(dentry);
1818
struct inode *parent_inode = parent_dentry->d_inode;
19-
struct pvfs2_inode_s *parent = PVFS2_I(parent_inode);
19+
struct orangefs_inode_s *parent = ORANGEFS_I(parent_inode);
2020
struct inode *inode = dentry->d_inode;
21-
struct pvfs2_kernel_op_s *new_op;
21+
struct orangefs_kernel_op_s *new_op;
2222
int ret = 0;
2323
int err = 0;
2424

2525
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__);
2626

27-
new_op = op_alloc(PVFS2_VFS_OP_LOOKUP);
27+
new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP);
2828
if (!new_op)
2929
goto out_put_parent;
3030

31-
new_op->upcall.req.lookup.sym_follow = PVFS2_LOOKUP_LINK_NO_FOLLOW;
31+
new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW;
3232
new_op->upcall.req.lookup.parent_refn = parent->refn;
3333
strncpy(new_op->upcall.req.lookup.d_name,
3434
dentry->d_name.name,
35-
PVFS2_NAME_LEN);
35+
ORANGEFS_NAME_LEN);
3636

3737
gossip_debug(GOSSIP_DCACHE_DEBUG,
3838
"%s:%s:%d interrupt flag [%d]\n",
@@ -41,7 +41,7 @@ static int pvfs2_revalidate_lookup(struct dentry *dentry)
4141
__LINE__,
4242
get_interruptible_flag(parent_inode));
4343

44-
err = service_operation(new_op, "pvfs2_lookup",
44+
err = service_operation(new_op, "orangefs_lookup",
4545
get_interruptible_flag(parent_inode));
4646
if (err)
4747
goto out_drop;
@@ -79,7 +79,7 @@ static int pvfs2_revalidate_lookup(struct dentry *dentry)
7979
*
8080
* Should return 1 if dentry can still be trusted, else 0
8181
*/
82-
static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags)
82+
static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
8383
{
8484
struct inode *inode;
8585
int ret = 0;
@@ -105,7 +105,7 @@ static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags)
105105
* exists, but is still in the expected place in the name space
106106
*/
107107
if (!is_root_handle(inode)) {
108-
if (!pvfs2_revalidate_lookup(dentry))
108+
if (!orangefs_revalidate_lookup(dentry))
109109
goto invalid_exit;
110110
} else {
111111
gossip_debug(GOSSIP_DCACHE_DEBUG,
@@ -119,7 +119,7 @@ static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags)
119119
__func__,
120120
inode,
121121
get_khandle_from_ino(inode));
122-
ret = pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_ALL_NOHINT);
122+
ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT);
123123
gossip_debug(GOSSIP_DCACHE_DEBUG,
124124
"%s: getattr %s (ret = %d), returning %s for dentry i_count=%d\n",
125125
__func__,
@@ -137,6 +137,6 @@ static int pvfs2_d_revalidate(struct dentry *dentry, unsigned int flags)
137137
return 0;
138138
}
139139

140-
const struct dentry_operations pvfs2_dentry_operations = {
141-
.d_revalidate = pvfs2_d_revalidate,
140+
const struct dentry_operations orangefs_dentry_operations = {
141+
.d_revalidate = orangefs_d_revalidate,
142142
};

0 commit comments

Comments
 (0)