diff options
author | Martin Brandenburg <martin@omnibond.com> | 2016-02-20 14:22:40 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-24 17:07:50 -0500 |
commit | 47b4948fdb1055cd8d8f86aebb0b3fcb06ba36d5 (patch) | |
tree | 57fb61a4062793df3c85c405b57fd16448969279 /fs/orangefs | |
parent | ee70fca0bc9a4a85c239e4f08b7ebf8351d2a733 (diff) |
orangefs: use ORANGEFS_NAME_LEN everywhere; remove ORANGEFS_NAME_MAX
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/dcache.c | 2 | ||||
-rw-r--r-- | fs/orangefs/downcall.h | 2 | ||||
-rw-r--r-- | fs/orangefs/namei.c | 18 | ||||
-rw-r--r-- | fs/orangefs/orangefs-dev-proto.h | 1 | ||||
-rw-r--r-- | fs/orangefs/super.c | 2 | ||||
-rw-r--r-- | fs/orangefs/upcall.h | 16 |
6 files changed, 20 insertions, 21 deletions
diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index 3c1703fbb60e..2de92b71d861 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c | |||
@@ -32,7 +32,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry) | |||
32 | new_op->upcall.req.lookup.parent_refn = parent->refn; | 32 | new_op->upcall.req.lookup.parent_refn = parent->refn; |
33 | strncpy(new_op->upcall.req.lookup.d_name, | 33 | strncpy(new_op->upcall.req.lookup.d_name, |
34 | dentry->d_name.name, | 34 | dentry->d_name.name, |
35 | ORANGEFS_NAME_LEN); | 35 | ORANGEFS_NAME_MAX); |
36 | 36 | ||
37 | gossip_debug(GOSSIP_DCACHE_DEBUG, | 37 | gossip_debug(GOSSIP_DCACHE_DEBUG, |
38 | "%s:%s:%d interrupt flag [%d]\n", | 38 | "%s:%s:%d interrupt flag [%d]\n", |
diff --git a/fs/orangefs/downcall.h b/fs/orangefs/downcall.h index 72d4cac54821..66b99210f1f9 100644 --- a/fs/orangefs/downcall.h +++ b/fs/orangefs/downcall.h | |||
@@ -33,7 +33,7 @@ struct orangefs_symlink_response { | |||
33 | 33 | ||
34 | struct orangefs_getattr_response { | 34 | struct orangefs_getattr_response { |
35 | struct ORANGEFS_sys_attr_s attributes; | 35 | struct ORANGEFS_sys_attr_s attributes; |
36 | char link_target[ORANGEFS_NAME_LEN]; | 36 | char link_target[ORANGEFS_NAME_MAX]; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct orangefs_mkdir_response { | 39 | struct orangefs_mkdir_response { |
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index b3ae3749a932..f26f6694c48d 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c | |||
@@ -38,7 +38,7 @@ static int orangefs_create(struct inode *dir, | |||
38 | ORANGEFS_TYPE_METAFILE, mode); | 38 | ORANGEFS_TYPE_METAFILE, mode); |
39 | 39 | ||
40 | strncpy(new_op->upcall.req.create.d_name, | 40 | strncpy(new_op->upcall.req.create.d_name, |
41 | dentry->d_name.name, ORANGEFS_NAME_LEN); | 41 | dentry->d_name.name, ORANGEFS_NAME_MAX); |
42 | 42 | ||
43 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); | 43 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); |
44 | 44 | ||
@@ -116,7 +116,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, | |||
116 | gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %s\n", | 116 | gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %s\n", |
117 | __func__, dentry->d_name.name); | 117 | __func__, dentry->d_name.name); |
118 | 118 | ||
119 | if (dentry->d_name.len > (ORANGEFS_NAME_LEN - 1)) | 119 | if (dentry->d_name.len > (ORANGEFS_NAME_MAX - 1)) |
120 | return ERR_PTR(-ENAMETOOLONG); | 120 | return ERR_PTR(-ENAMETOOLONG); |
121 | 121 | ||
122 | new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP); | 122 | new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP); |
@@ -133,7 +133,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, | |||
133 | new_op->upcall.req.lookup.parent_refn = parent->refn; | 133 | new_op->upcall.req.lookup.parent_refn = parent->refn; |
134 | 134 | ||
135 | strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, | 135 | strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name, |
136 | ORANGEFS_NAME_LEN); | 136 | ORANGEFS_NAME_MAX); |
137 | 137 | ||
138 | gossip_debug(GOSSIP_NAME_DEBUG, | 138 | gossip_debug(GOSSIP_NAME_DEBUG, |
139 | "%s: doing lookup on %s under %pU,%d (follow=%s)\n", | 139 | "%s: doing lookup on %s under %pU,%d (follow=%s)\n", |
@@ -234,7 +234,7 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry) | |||
234 | 234 | ||
235 | new_op->upcall.req.remove.parent_refn = parent->refn; | 235 | new_op->upcall.req.remove.parent_refn = parent->refn; |
236 | strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, | 236 | strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name, |
237 | ORANGEFS_NAME_LEN); | 237 | ORANGEFS_NAME_MAX); |
238 | 238 | ||
239 | ret = service_operation(new_op, "orangefs_unlink", | 239 | ret = service_operation(new_op, "orangefs_unlink", |
240 | get_interruptible_flag(inode)); | 240 | get_interruptible_flag(inode)); |
@@ -283,8 +283,8 @@ static int orangefs_symlink(struct inode *dir, | |||
283 | 283 | ||
284 | strncpy(new_op->upcall.req.sym.entry_name, | 284 | strncpy(new_op->upcall.req.sym.entry_name, |
285 | dentry->d_name.name, | 285 | dentry->d_name.name, |
286 | ORANGEFS_NAME_LEN); | 286 | ORANGEFS_NAME_MAX); |
287 | strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_LEN); | 287 | strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX); |
288 | 288 | ||
289 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); | 289 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); |
290 | 290 | ||
@@ -347,7 +347,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode | |||
347 | ORANGEFS_TYPE_DIRECTORY, mode); | 347 | ORANGEFS_TYPE_DIRECTORY, mode); |
348 | 348 | ||
349 | strncpy(new_op->upcall.req.mkdir.d_name, | 349 | strncpy(new_op->upcall.req.mkdir.d_name, |
350 | dentry->d_name.name, ORANGEFS_NAME_LEN); | 350 | dentry->d_name.name, ORANGEFS_NAME_MAX); |
351 | 351 | ||
352 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); | 352 | ret = service_operation(new_op, __func__, get_interruptible_flag(dir)); |
353 | 353 | ||
@@ -420,10 +420,10 @@ static int orangefs_rename(struct inode *old_dir, | |||
420 | 420 | ||
421 | strncpy(new_op->upcall.req.rename.d_old_name, | 421 | strncpy(new_op->upcall.req.rename.d_old_name, |
422 | old_dentry->d_name.name, | 422 | old_dentry->d_name.name, |
423 | ORANGEFS_NAME_LEN); | 423 | ORANGEFS_NAME_MAX); |
424 | strncpy(new_op->upcall.req.rename.d_new_name, | 424 | strncpy(new_op->upcall.req.rename.d_new_name, |
425 | new_dentry->d_name.name, | 425 | new_dentry->d_name.name, |
426 | ORANGEFS_NAME_LEN); | 426 | ORANGEFS_NAME_MAX); |
427 | 427 | ||
428 | ret = service_operation(new_op, | 428 | ret = service_operation(new_op, |
429 | "orangefs_rename", | 429 | "orangefs_rename", |
diff --git a/fs/orangefs/orangefs-dev-proto.h b/fs/orangefs/orangefs-dev-proto.h index 5a8725a88eac..9eac9d9a3f3a 100644 --- a/fs/orangefs/orangefs-dev-proto.h +++ b/fs/orangefs/orangefs-dev-proto.h | |||
@@ -46,7 +46,6 @@ | |||
46 | * Misc constants. Please retain them as multiples of 8! | 46 | * Misc constants. Please retain them as multiples of 8! |
47 | * Otherwise 32-64 bit interactions will be messed up :) | 47 | * Otherwise 32-64 bit interactions will be messed up :) |
48 | */ | 48 | */ |
49 | #define ORANGEFS_NAME_LEN 0x00000100 | ||
50 | #define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000400 | 49 | #define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000400 |
51 | #define ORANGEFS_MAX_DEBUG_ARRAY_LEN 0x00000800 | 50 | #define ORANGEFS_MAX_DEBUG_ARRAY_LEN 0x00000800 |
52 | 51 | ||
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 65ddc74e96b6..eac24eb7fe80 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c | |||
@@ -170,7 +170,7 @@ static int orangefs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
170 | buf->f_type = sb->s_magic; | 170 | buf->f_type = sb->s_magic; |
171 | memcpy(&buf->f_fsid, &ORANGEFS_SB(sb)->fs_id, sizeof(buf->f_fsid)); | 171 | memcpy(&buf->f_fsid, &ORANGEFS_SB(sb)->fs_id, sizeof(buf->f_fsid)); |
172 | buf->f_bsize = new_op->downcall.resp.statfs.block_size; | 172 | buf->f_bsize = new_op->downcall.resp.statfs.block_size; |
173 | buf->f_namelen = ORANGEFS_NAME_LEN; | 173 | buf->f_namelen = ORANGEFS_NAME_MAX; |
174 | 174 | ||
175 | buf->f_blocks = (sector_t) new_op->downcall.resp.statfs.blocks_total; | 175 | buf->f_blocks = (sector_t) new_op->downcall.resp.statfs.blocks_total; |
176 | buf->f_bfree = (sector_t) new_op->downcall.resp.statfs.blocks_avail; | 176 | buf->f_bfree = (sector_t) new_op->downcall.resp.statfs.blocks_avail; |
diff --git a/fs/orangefs/upcall.h b/fs/orangefs/upcall.h index 781cbc38523a..af6dcac180ab 100644 --- a/fs/orangefs/upcall.h +++ b/fs/orangefs/upcall.h | |||
@@ -27,20 +27,20 @@ struct orangefs_lookup_request_s { | |||
27 | __s32 sym_follow; | 27 | __s32 sym_follow; |
28 | __s32 __pad1; | 28 | __s32 __pad1; |
29 | struct orangefs_object_kref parent_refn; | 29 | struct orangefs_object_kref parent_refn; |
30 | char d_name[ORANGEFS_NAME_LEN]; | 30 | char d_name[ORANGEFS_NAME_MAX]; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct orangefs_create_request_s { | 33 | struct orangefs_create_request_s { |
34 | struct orangefs_object_kref parent_refn; | 34 | struct orangefs_object_kref parent_refn; |
35 | struct ORANGEFS_sys_attr_s attributes; | 35 | struct ORANGEFS_sys_attr_s attributes; |
36 | char d_name[ORANGEFS_NAME_LEN]; | 36 | char d_name[ORANGEFS_NAME_MAX]; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct orangefs_symlink_request_s { | 39 | struct orangefs_symlink_request_s { |
40 | struct orangefs_object_kref parent_refn; | 40 | struct orangefs_object_kref parent_refn; |
41 | struct ORANGEFS_sys_attr_s attributes; | 41 | struct ORANGEFS_sys_attr_s attributes; |
42 | char entry_name[ORANGEFS_NAME_LEN]; | 42 | char entry_name[ORANGEFS_NAME_MAX]; |
43 | char target[ORANGEFS_NAME_LEN]; | 43 | char target[ORANGEFS_NAME_MAX]; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | struct orangefs_getattr_request_s { | 46 | struct orangefs_getattr_request_s { |
@@ -56,13 +56,13 @@ struct orangefs_setattr_request_s { | |||
56 | 56 | ||
57 | struct orangefs_remove_request_s { | 57 | struct orangefs_remove_request_s { |
58 | struct orangefs_object_kref parent_refn; | 58 | struct orangefs_object_kref parent_refn; |
59 | char d_name[ORANGEFS_NAME_LEN]; | 59 | char d_name[ORANGEFS_NAME_MAX]; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct orangefs_mkdir_request_s { | 62 | struct orangefs_mkdir_request_s { |
63 | struct orangefs_object_kref parent_refn; | 63 | struct orangefs_object_kref parent_refn; |
64 | struct ORANGEFS_sys_attr_s attributes; | 64 | struct ORANGEFS_sys_attr_s attributes; |
65 | char d_name[ORANGEFS_NAME_LEN]; | 65 | char d_name[ORANGEFS_NAME_MAX]; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | struct orangefs_readdir_request_s { | 68 | struct orangefs_readdir_request_s { |
@@ -84,8 +84,8 @@ struct orangefs_readdirplus_request_s { | |||
84 | struct orangefs_rename_request_s { | 84 | struct orangefs_rename_request_s { |
85 | struct orangefs_object_kref old_parent_refn; | 85 | struct orangefs_object_kref old_parent_refn; |
86 | struct orangefs_object_kref new_parent_refn; | 86 | struct orangefs_object_kref new_parent_refn; |
87 | char d_old_name[ORANGEFS_NAME_LEN]; | 87 | char d_old_name[ORANGEFS_NAME_MAX]; |
88 | char d_new_name[ORANGEFS_NAME_LEN]; | 88 | char d_new_name[ORANGEFS_NAME_MAX]; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | struct orangefs_statfs_request_s { | 91 | struct orangefs_statfs_request_s { |