Skip to content

Commit 4153c7f

Browse files
vshankaridryomov
authored andcommitted
libceph: rename parse_fsid() to ceph_parse_fsid() and export
... as it is too generic. also, use __func__ when logging rather than hardcoding the function name. Signed-off-by: Venky Shankar <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 2d7c86a commit 4153c7f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

include/linux/ceph/libceph.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ extern bool libceph_compatible(void *data);
296296
extern const char *ceph_msg_type_name(int type);
297297
extern int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid);
298298
extern void *ceph_kvmalloc(size_t size, gfp_t flags);
299+
extern int ceph_parse_fsid(const char *str, struct ceph_fsid *fsid);
299300

300301
struct fs_parameter;
301302
struct fc_log;

net/ceph/ceph_common.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ void *ceph_kvmalloc(size_t size, gfp_t flags)
217217
return p;
218218
}
219219

220-
static int parse_fsid(const char *str, struct ceph_fsid *fsid)
220+
int ceph_parse_fsid(const char *str, struct ceph_fsid *fsid)
221221
{
222222
int i = 0;
223223
char tmp[3];
224224
int err = -EINVAL;
225225
int d;
226226

227-
dout("parse_fsid '%s'\n", str);
227+
dout("%s '%s'\n", __func__, str);
228228
tmp[2] = 0;
229229
while (*str && i < 16) {
230230
if (ispunct(*str)) {
@@ -244,9 +244,10 @@ static int parse_fsid(const char *str, struct ceph_fsid *fsid)
244244

245245
if (i == 16)
246246
err = 0;
247-
dout("parse_fsid ret %d got fsid %pU\n", err, fsid);
247+
dout("%s ret %d got fsid %pU\n", __func__, err, fsid);
248248
return err;
249249
}
250+
EXPORT_SYMBOL(ceph_parse_fsid);
250251

251252
/*
252253
* ceph options
@@ -464,7 +465,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt,
464465
break;
465466

466467
case Opt_fsid:
467-
err = parse_fsid(param->string, &opt->fsid);
468+
err = ceph_parse_fsid(param->string, &opt->fsid);
468469
if (err) {
469470
error_plog(&log, "Failed to parse fsid: %d", err);
470471
return err;

0 commit comments

Comments
 (0)