From: Sage Weil Date: Fri, 17 Jul 2009 19:50:30 +0000 (-0700) Subject: kclient: make dout's ceph_file_part NOT inline X-Git-Tag: v0.11~63 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32b73720cd3458716a7cc61bbe3798dd25edb586;p=ceph.git kclient: make dout's ceph_file_part NOT inline --- diff --git a/src/kernel/ceph_debug.h b/src/kernel/ceph_debug.h index 2c39f0919131..f1868ebbfb32 100644 --- a/src/kernel/ceph_debug.h +++ b/src/kernel/ceph_debug.h @@ -5,14 +5,7 @@ * wrap pr_debug to include a filename:lineno prefix on each line */ -static inline const char *ceph_file_part(const char *s, int len) -{ - const char *e = s + len; - - while (e != s && *(e-1) != '/') - e--; - return e; -} +extern const char *ceph_file_part(const char *s, int len); #define _dout(fmt, args...) \ pr_debug(" %12.12s:%-4d : " fmt "%s", \ diff --git a/src/kernel/super.c b/src/kernel/super.c index 8e2bd41e3325..a3cccf3ef968 100644 --- a/src/kernel/super.c +++ b/src/kernel/super.c @@ -28,6 +28,19 @@ void ceph_dispatch(void *p, struct ceph_msg *msg); void ceph_peer_reset(void *p, struct ceph_entity_addr *peer_addr, struct ceph_entity_name *peer_name); +/* + * find filename portion of a path (/foo/bar/baz -> baz) + */ +const char *ceph_file_part(const char *s, int len) +{ + const char *e = s + len; + + while (e != s && *(e-1) != '/') + e--; + return e; +} + + /* * super ops */