]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: use pr_fmt to prefix module name
authorSage Weil <sage@newdream.net>
Tue, 22 Sep 2009 19:15:33 +0000 (12:15 -0700)
committerSage Weil <sage@newdream.net>
Tue, 22 Sep 2009 19:15:33 +0000 (12:15 -0700)
This doubles up the ceph:ceph: if we have CONFIG_DYNAMIC_DEBUG, but
that's not our fault.

18 files changed:
src/kernel/addr.c
src/kernel/caps.c
src/kernel/ceph_debug.h
src/kernel/debugfs.c
src/kernel/dir.c
src/kernel/export.c
src/kernel/file.c
src/kernel/inode.c
src/kernel/mds_client.c
src/kernel/mdsmap.c
src/kernel/messenger.c
src/kernel/mon_client.c
src/kernel/msgpool.c
src/kernel/osd_client.c
src/kernel/osdmap.c
src/kernel/snap.c
src/kernel/super.c
src/kernel/super.h

index 3f8c4b30f0d51dba0f5a6fc04939a0b00c610103..91e95cac6204da3c65a6c173a81e7b34c40cc027 100644 (file)
@@ -1,3 +1,4 @@
+#include "ceph_debug.h"
 
 #include <linux/backing-dev.h>
 #include <linux/fs.h>
@@ -7,9 +8,7 @@
 #include <linux/pagevec.h>
 #include <linux/task_io_accounting_ops.h>
 
-#include "ceph_debug.h"
 #include "super.h"
-
 #include "osd_client.h"
 
 /*
@@ -162,8 +161,7 @@ static void ceph_invalidatepage(struct page *page, unsigned long offset)
         * warning, in case we end up with accounting problems later.
         */
        if (!PageDirty(page))
-               pr_err("ceph %p invalidatepage %p page not dirty\n", inode,
-                      page);
+               pr_err("%p invalidatepage %p page not dirty\n", inode, page);
 
        if (offset == 0)
                ClearPageChecked(page);
@@ -623,7 +621,7 @@ static int ceph_writepages_start(struct address_space *mapping,
 
        client = ceph_inode_to_client(inode);
        if (client->mount_state == CEPH_MOUNT_SHUTDOWN) {
-               pr_warning("ceph writepage_start %p on forced umount\n", inode);
+               pr_warning("writepage_start %p on forced umount\n", inode);
                return -EIO; /* we're in a forced umount, don't write! */
        }
        if (client->mount_args.wsize && client->mount_args.wsize < wsize)
index 06a3b5d3ed012eb45957efb175e1973ea84290df..80772cfdb5dcdce4e99d66e552c75d1c51fa3ca8 100644 (file)
@@ -1,10 +1,11 @@
+#include "ceph_debug.h"
+
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/vmalloc.h>
 #include <linux/wait.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "decode.h"
 #include "messenger.h"
@@ -202,7 +203,7 @@ int ceph_reserve_caps(struct ceph_cap_reservation *ctx, int need)
 
 out_alloc_count:
        /* we didn't manage to reserve as much as we needed */
-       pr_warning("ceph reserve caps ctx=%p ENOMEM need=%d got=%d\n",
+       pr_warning("reserve caps ctx=%p ENOMEM need=%d got=%d\n",
                   ctx, need, have);
        return ret;
 }
@@ -1756,7 +1757,7 @@ static void kick_flushing_capsnaps(struct ceph_mds_client *mdsc,
                             cap, capsnap);
                        __ceph_flush_snaps(ci, &session);
                } else {
-                       pr_err("ceph %p auth cap %p not mds%d ???\n", inode,
+                       pr_err("%p auth cap %p not mds%d ???\n", inode,
                               cap, session->s_mds);
                        spin_unlock(&inode->i_lock);
                }
@@ -1792,7 +1793,7 @@ void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc,
                                spin_unlock(&inode->i_lock);
                        }
                } else {
-                       pr_err("ceph %p auth cap %p not mds%d ???\n", inode,
+                       pr_err("%p auth cap %p not mds%d ???\n", inode,
                               cap, session->s_mds);
                        spin_unlock(&inode->i_lock);
                }
index be9b8bc10491082f055bd296dfdc30a1ce5e2c58..1818c2305610e28f6dbb7d3e126e7137d28c1365 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _FS_CEPH_DEBUG_H
 #define _FS_CEPH_DEBUG_H
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef CONFIG_CEPH_FS_PRETTYDEBUG
 
 /*
index e757ed669ea81d3ff6dee6f8763fef9fea0f6e3b..8db43924cb9ce915bcafc9b78baf377ee6cdca44 100644 (file)
@@ -1,3 +1,5 @@
+#include "ceph_debug.h"
+
 #include <linux/module.h>
 #include <linux/ctype.h>
 #include <linux/debugfs.h>
index 41eb9f5382a09f410c1d37598d2c4cb5c7b10e49..5307263f6190b42eaf46e70eae2a3f43e707306f 100644 (file)
@@ -1,9 +1,10 @@
+#include "ceph_debug.h"
+
 #include <linux/spinlock.h>
 #include <linux/fs_struct.h>
 #include <linux/namei.h>
 #include <linux/sched.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 
 /*
index 81cb20b817003760775259bfe030682dd09333e0..ebcc530923c07a42657bb1c2b17bbd91036b49f3 100644 (file)
@@ -1,8 +1,9 @@
+#include "ceph_debug.h"
+
 #include <linux/exportfs.h>
 #include <asm/unaligned.h>
 
 #include "super.h"
-#include "ceph_debug.h"
 
 /*
  * NFS export support
@@ -97,7 +98,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,
 #endif
 
        if (!dentry) {
-               pr_err("ceph fh_to_dentry %llx -- inode %p but ENOMEM\n",
+               pr_err("fh_to_dentry %llx -- inode %p but ENOMEM\n",
                       fh->ino, inode);
                iput(inode);
                return ERR_PTR(-ENOMEM);
@@ -157,7 +158,7 @@ static struct dentry *__cfh_to_dentry(struct super_block *sb,
        dentry = d_alloc_anon(inode);
 #endif
        if (!dentry) {
-               pr_err("ceph cfh_to_dentry %llx -- inode %p but ENOMEM\n",
+               pr_err("cfh_to_dentry %llx -- inode %p but ENOMEM\n",
                       cfh->ino, inode);
                iput(inode);
                return ERR_PTR(-ENOMEM);
@@ -199,7 +200,7 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb,
        if (fh_type == 1)
                return ERR_PTR(-ESTALE);
 
-       pr_debug("ceph_fh_to_parent %llx/%d\n", cfh->parent_ino,
+       pr_debug("fh_to_parent %llx/%d\n", cfh->parent_ino,
                 cfh->parent_name_hash);
 
        vino.ino = cfh->ino;
@@ -214,7 +215,7 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb,
        dentry = d_alloc_anon(inode);
 #endif
        if (!dentry) {
-               pr_err("ceph fh_to_parent %llx -- inode %p but ENOMEM\n",
+               pr_err("fh_to_parent %llx -- inode %p but ENOMEM\n",
                       cfh->ino, inode);
                iput(inode);
                return ERR_PTR(-ENOMEM);
index aa4f12c35fadf7e7e343f3ee76dbed598cced526..aa8bfea0e61343c107bbf85a7e84698d225988e7 100644 (file)
@@ -1,10 +1,10 @@
+#include "ceph_debug.h"
 
 #include <linux/sched.h>
 #include <linux/file.h>
 #include <linux/namei.h>
 #include <linux/writeback.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "mds_client.h"
 
index 96362268e8e665878adb7debfcbc176a3c22d8d5..ee7ee57947352a351ae1327e0f97c0f8daad7e6c 100644 (file)
@@ -1,3 +1,5 @@
+#include "ceph_debug.h"
+
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/smp_lock.h>
@@ -9,7 +11,6 @@
 #include <linux/writeback.h>
 #include <linux/vmalloc.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "decode.h"
 
@@ -120,7 +121,7 @@ static struct ceph_inode_frag *__get_or_create_frag(struct ceph_inode_info *ci,
 
        frag = kmalloc(sizeof(*frag), GFP_NOFS);
        if (!frag) {
-               pr_err("ceph __get_or_create_frag ENOMEM on %p %llx.%llx "
+               pr_err("__get_or_create_frag ENOMEM on %p %llx.%llx "
                       "frag %x\n", &ci->vfs_inode,
                       ceph_vinop(&ci->vfs_inode), f);
                return ERR_PTR(-ENOMEM);
@@ -232,7 +233,7 @@ static int ceph_fill_dirfrag(struct inode *inode,
        if (IS_ERR(frag)) {
                /* this is not the end of the world; we can continue
                   with bad/inaccurate delegation info */
-               pr_err("ceph fill_dirfrag ENOMEM on mds ref %llx.%llx fg %x\n",
+               pr_err("fill_dirfrag ENOMEM on mds ref %llx.%llx fg %x\n",
                       ceph_vinop(inode), le32_to_cpu(dirinfo->frag));
                err = -ENOMEM;
                goto out;
@@ -505,7 +506,7 @@ static int fill_inode(struct inode *inode,
        if (iinfo->xattr_len > 4) {
                xattr_blob = ceph_buffer_new_alloc(iinfo->xattr_len, GFP_NOFS);
                if (!xattr_blob)
-                       pr_err("ceph fill_inode ENOMEM xattr blob %d bytes\n",
+                       pr_err("fill_inode ENOMEM xattr blob %d bytes\n",
                               iinfo->xattr_len);
        }
 
@@ -635,7 +636,7 @@ static int fill_inode(struct inode *inode,
                        inode->i_size = ci->i_rbytes;
                break;
        default:
-               pr_err("ceph fill_inode %llx.%llx BAD mode 0%o\n",
+               pr_err("fill_inode %llx.%llx BAD mode 0%o\n",
                       ceph_vinop(inode), inode->i_mode);
        }
 
@@ -794,7 +795,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in,
                d_drop(dn);
        realdn = d_materialise_unique(dn, in);
        if (IS_ERR(realdn)) {
-               pr_err("ceph splice_dentry error %p inode %p ino %llx.%llx\n",
+               pr_err("splice_dentry error %p inode %p ino %llx.%llx\n",
                       dn, in, ceph_vinop(in));
                if (prehash)
                        *prehash = false; /* don't rehash on error */
@@ -856,7 +857,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
         * invariants.
         */
        if (rinfo->head->op & CEPH_MDS_OP_WRITE) {
-               pr_info("ceph fill_trace faking empty trace on %lld %s\n",
+               pr_info("fill_trace faking empty trace on %lld %s\n",
                        req->r_tid, ceph_mds_op_name(rinfo->head->op));
                if (rinfo->head->is_dentry) {
                        rinfo->head->is_dentry = 0;
@@ -975,7 +976,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
                if (!dn->d_inode) {
                        in = ceph_get_inode(sb, vino);
                        if (IS_ERR(in)) {
-                               pr_err("ceph fill_trace bad get_inode "
+                               pr_err("fill_trace bad get_inode "
                                       "%llx.%llx\n", vino.ino, vino.snap);
                                err = PTR_ERR(in);
                                d_delete(dn);
@@ -1017,7 +1018,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
                vino.snap = le64_to_cpu(ininfo->snapid);
                in = ceph_get_inode(sb, vino);
                if (IS_ERR(in)) {
-                       pr_err("ceph fill_inode get_inode badness %llx.%llx\n",
+                       pr_err("fill_inode get_inode badness %llx.%llx\n",
                               vino.ino, vino.snap);
                        err = PTR_ERR(in);
                        d_delete(dn);
@@ -1055,7 +1056,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
                                 req->r_fmode : -1,
                                 &req->r_caps_reservation);
                if (err < 0) {
-                       pr_err("ceph fill_inode badness %p %llx.%llx\n",
+                       pr_err("fill_inode badness %p %llx.%llx\n",
                               in, ceph_vinop(in));
                        goto done;
                }
@@ -1160,7 +1161,7 @@ retry_lookup:
                if (fill_inode(in, &rinfo->dir_in[i], NULL, session,
                               req->r_request_started, -1,
                               &req->r_caps_reservation) < 0) {
-                       pr_err("ceph fill_inode badness on %p\n", in);
+                       pr_err("fill_inode badness on %p\n", in);
                        dput(dn);
                        continue;
                }
@@ -1772,7 +1773,7 @@ static int __set_xattr(struct ceph_inode_info *ci,
                ci->i_xattrs.vals_size -= xattr->val_len;
        }
        if (!xattr) {
-               pr_err("ceph __set_xattr ENOMEM on %p %llx.%llx xattr %s=%s\n",
+               pr_err("__set_xattr ENOMEM on %p %llx.%llx xattr %s=%s\n",
                       &ci->vfs_inode, ceph_vinop(&ci->vfs_inode), name,
                       xattr->val);
                return -ENOMEM;
index b780466b091e3d02a845ab4c5aba6649c1cc1d67..669271277c5f720f3385812a7a5fa27b7ad0b56b 100644 (file)
@@ -1,10 +1,10 @@
+#include "ceph_debug.h"
 
 #include <linux/wait.h>
 #include <linux/sched.h>
+
 #include "mds_client.h"
 #include "mon_client.h"
-
-#include "ceph_debug.h"
 #include "super.h"
 #include "messenger.h"
 #include "decode.h"
@@ -114,7 +114,7 @@ static int parse_reply_info_trace(void **p, void *end,
 bad:
        err = -EIO;
 out_bad:
-       pr_err("ceph problem parsing mds trace %d\n", err);
+       pr_err("problem parsing mds trace %d\n", err);
        return err;
 }
 
@@ -185,7 +185,7 @@ done:
 bad:
        err = -EIO;
 out_bad:
-       pr_err("ceph problem parsing dir contents %d\n", err);
+       pr_err("problem parsing dir contents %d\n", err);
        return err;
 }
 
@@ -232,7 +232,7 @@ static int parse_reply_info(struct ceph_msg *msg,
 bad:
        err = -EIO;
 out_bad:
-       pr_err("ceph mds parse_reply err %d\n", err);
+       pr_err("mds parse_reply err %d\n", err);
        return err;
 }
 
@@ -606,7 +606,7 @@ static struct ceph_msg *create_session_msg(u32 op, u64 seq)
 
        msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h), 0, 0, NULL);
        if (IS_ERR(msg)) {
-               pr_err("ceph create_session_msg ENOMEM creating msg\n");
+               pr_err("create_session_msg ENOMEM creating msg\n");
                return ERR_PTR(PTR_ERR(msg));
        }
        h = msg->front.iov_base;
@@ -739,7 +739,7 @@ static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap,
 
        spin_lock(&inode->i_lock);
        if (cap->gen != session->s_cap_gen) {
-               pr_err("ceph failed reconnect %p %llx.%llx cap %p "
+               pr_err("failed reconnect %p %llx.%llx cap %p "
                       "(gen %d < session %d)\n", inode, ceph_vinop(inode),
                       cap, cap->gen, session->s_cap_gen);
                __ceph_remove_cap(cap, NULL);
@@ -769,7 +769,7 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,
 
        if (time_after_eq(jiffies, session->s_cap_ttl) &&
            time_after_eq(session->s_cap_ttl, session->s_renew_requested))
-               pr_info("ceph mds%d caps stale\n", session->s_mds);
+               pr_info("mds%d caps stale\n", session->s_mds);
 
        /* do not try to renew caps until a recovering mds has reconnected
         * with its clients. */
@@ -809,11 +809,10 @@ static void renewed_caps(struct ceph_mds_client *mdsc,
 
        if (was_stale) {
                if (time_before(jiffies, session->s_cap_ttl)) {
-                       pr_info("ceph mds%d caps renewed\n", session->s_mds);
+                       pr_info("mds%d caps renewed\n", session->s_mds);
                        wake = 1;
                } else {
-                       pr_info("ceph mds%d caps still stale\n",
-                               session->s_mds);
+                       pr_info("mds%d caps still stale\n", session->s_mds);
                }
        }
        dout("renewed_caps mds%d ttl now %lu, was %s, now %s\n",
@@ -1143,8 +1142,7 @@ retry:
                        len += 1 + temp->d_name.len;
                temp = temp->d_parent;
                if (temp == NULL) {
-                       pr_err("ceph build_path_dentry corrupt dentry %p\n",
-                              dentry);
+                       pr_err("build_path_dentry corrupt dentry %p\n", dentry);
                        return ERR_PTR(-EINVAL);
                }
        }
@@ -1178,13 +1176,13 @@ retry:
                        path[--pos] = '/';
                temp = temp->d_parent;
                if (temp == NULL) {
-                       pr_err("ceph build_path_dentry corrupt dentry\n");
+                       pr_err("build_path_dentry corrupt dentry\n");
                        kfree(path);
                        return ERR_PTR(-EINVAL);
                }
        }
        if (pos != 0) {
-               pr_err("ceph build_path_dentry did not end path lookup where "
+               pr_err("build_path_dentry did not end path lookup where "
                       "expected, namelen is %d, pos is %d\n", len, pos);
                /* presumably this is only possible if racing with a
                   rename of one of the parent directories (we can not
@@ -1644,7 +1642,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
        if (msg->hdr.src.name.type != CEPH_ENTITY_TYPE_MDS)
                return;
        if (msg->front.iov_len < sizeof(*head)) {
-               pr_err("ceph_mdsc_handle_reply got corrupt (short) reply\n");
+               pr_err("mdsc_handle_reply got corrupt (short) reply\n");
                return;
        }
 
@@ -1662,7 +1660,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
 
        /* correct session? */
        if (!req->r_session && req->r_session != session) {
-               pr_err("ceph_mdsc_handle_reply got %llu on session mds%d"
+               pr_err("mdsc_handle_reply got %llu on session mds%d"
                       " not mds%d\n", tid, session->s_mds,
                       req->r_session ? req->r_session->s_mds : -1);
                mutex_unlock(&mdsc->mutex);
@@ -1672,7 +1670,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
        /* dup? */
        if ((req->r_got_unsafe && !head->safe) ||
            (req->r_got_safe && head->safe)) {
-               pr_warning("ceph got a dup %s reply on %llu from mds%d\n",
+               pr_warning("got a dup %s reply on %llu from mds%d\n",
                           head->safe ? "safe" : "unsafe", tid, mds);
                mutex_unlock(&mdsc->mutex);
                goto out;
@@ -1734,7 +1732,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
 
        mutex_lock(&session->s_mutex);
        if (err < 0) {
-               pr_err("ceph_mdsc_handle_reply got corrupt reply mds%d\n", mds);
+               pr_err("mdsc_handle_reply got corrupt reply mds%d\n", mds);
                goto out_err;
        }
 
@@ -1830,7 +1828,7 @@ out:
        return;
 
 bad:
-       pr_err("ceph_mdsc_handle_forward decode error err=%d\n", err);
+       pr_err("mdsc_handle_forward decode error err=%d\n", err);
 }
 
 /*
@@ -1869,7 +1867,7 @@ static void handle_session(struct ceph_mds_session *session,
 
        if (session->s_state == CEPH_MDS_SESSION_HUNG) {
                session->s_state = CEPH_MDS_SESSION_OPEN;
-               pr_info("ceph mds%d came back\n", session->s_mds);
+               pr_info("mds%d came back\n", session->s_mds);
        }
 
        switch (op) {
@@ -1895,7 +1893,7 @@ static void handle_session(struct ceph_mds_session *session,
                break;
 
        case CEPH_SESSION_STALE:
-               pr_info("ceph mds%d caps went stale, renewing\n",
+               pr_info("mds%d caps went stale, renewing\n",
                        session->s_mds);
                spin_lock(&session->s_cap_lock);
                session->s_cap_gen++;
@@ -1909,7 +1907,7 @@ static void handle_session(struct ceph_mds_session *session,
                break;
 
        default:
-               pr_err("ceph_mdsc_handle_session bad op %d mds%d\n", op, mds);
+               pr_err("mdsc_handle_session bad op %d mds%d\n", op, mds);
                WARN_ON(1);
        }
 
@@ -1922,7 +1920,7 @@ static void handle_session(struct ceph_mds_session *session,
        return;
 
 bad:
-       pr_err("ceph_mdsc_handle_session corrupt message mds%d len %d\n", mds,
+       pr_err("mdsc_handle_session corrupt message mds%d len %d\n", mds,
               (int)msg->front.iov_len);
        return;
 }
@@ -2046,7 +2044,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds)
        __le32 *pnum_caps, *pnum_realms;
        struct encode_caps_data iter_args;
 
-       pr_info("ceph reconnect to recovering mds%d\n", mds);
+       pr_info("reconnect to recovering mds%d\n", mds);
 
        /* find session */
        session = __ceph_lookup_mds_session(mdsc, mds);
@@ -2081,7 +2079,7 @@ retry:
        reply = ceph_msg_new(CEPH_MSG_CLIENT_RECONNECT, len, 0, 0, NULL);
        if (IS_ERR(reply)) {
                err = PTR_ERR(reply);
-               pr_err("ceph send_mds_reconnect ENOMEM on %d for mds%d\n",
+               pr_err("send_mds_reconnect ENOMEM on %d for mds%d\n",
                       len, mds);
                goto out;
        }
@@ -2310,8 +2308,7 @@ static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
        session = __ceph_lookup_mds_session(mdsc, mds);
        mutex_unlock(&mdsc->mutex);
        if (!session) {
-               pr_err("ceph handle_lease got lease but no session mds%d\n",
-                      mds);
+               pr_err("handle_lease got lease but no session mds%d\n", mds);
                return;
        }
 
@@ -2387,7 +2384,7 @@ out:
        return;
 
 bad:
-       pr_err("ceph corrupt lease message\n");
+       pr_err("corrupt lease message\n");
 }
 
 void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
@@ -2535,7 +2532,7 @@ static void delayed_work(struct work_struct *work)
                if (s->s_ttl && time_after(jiffies, s->s_ttl)) {
                        if (s->s_state == CEPH_MDS_SESSION_OPEN) {
                                s->s_state = CEPH_MDS_SESSION_HUNG;
-                               pr_info("ceph mds%d hung\n", s->s_mds);
+                               pr_info("mds%d hung\n", s->s_mds);
                        }
                }
                if (s->s_state < CEPH_MDS_SESSION_OPEN) {
@@ -2788,7 +2785,7 @@ void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
        ceph_decode_need(&p, end, sizeof(fsid)+2*sizeof(u32), bad);
        ceph_decode_copy(&p, &fsid, sizeof(fsid));
        if (ceph_fsid_compare(&fsid, &mdsc->client->monc.monmap->fsid)) {
-               pr_err("ceph got mdsmap with wrong fsid\n");
+               pr_err("got mdsmap with wrong fsid\n");
                return;
        }
        ceph_decode_32(&p, epoch);
@@ -2831,7 +2828,7 @@ void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
 bad_unlock:
        mutex_unlock(&mdsc->mutex);
 bad:
-       pr_err("ceph error decoding mdsmap %d\n", err);
+       pr_err("error decoding mdsmap %d\n", err);
        return;
 }
 
@@ -2865,7 +2862,7 @@ static void peer_reset(struct ceph_connection *con)
 {
        struct ceph_mds_session *s = con->private;
 
-       pr_err("ceph mds%d gave us the boot.  IMPLEMENT RECONNECT.\n",
+       pr_err("mds%d gave us the boot.  IMPLEMENT RECONNECT.\n",
               s->s_mds);
 }
 
@@ -2899,7 +2896,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
                break;
 
        default:
-               pr_err("ceph received unknown message type %d %s\n", type,
+               pr_err("received unknown message type %d %s\n", type,
                       ceph_msg_type_name(type));
        }
        ceph_msg_put(msg);
index f13e1a5fbd9e7bd5ccfa4787f304c0a4bd877c6e..8292ec2081b14fd53adcb983abf963532730c0c1 100644 (file)
@@ -1,3 +1,5 @@
+#include "ceph_debug.h"
+
 #include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/random.h>
@@ -8,7 +10,6 @@
 #include "messenger.h"
 #include "decode.h"
 
-#include "ceph_debug.h"
 #include "super.h"
 
 
@@ -125,7 +126,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
 badmem:
        err = -ENOMEM;
 bad:
-       pr_err("ceph corrupt mdsmap\n");
+       pr_err("corrupt mdsmap\n");
        ceph_mdsmap_destroy(m);
        return ERR_PTR(-EINVAL);
 }
index 14771e54237f2f44e2b62612711adca08f06b5c2..2d018d7ee2afbea7cdcdb9870b17d5b8ee522086 100644 (file)
@@ -1,3 +1,5 @@
+#include "ceph_debug.h"
+
 #include <linux/crc32c.h>
 #include <linux/kthread.h>
 #include <linux/socket.h>
@@ -7,7 +9,6 @@
 #include <linux/ctype.h>
 #include <net/tcp.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "messenger.h"
 
@@ -41,7 +42,7 @@ int ceph_msgr_init(void)
        ceph_msgr_wq = create_workqueue("ceph-msgr");
        if (IS_ERR(ceph_msgr_wq)) {
                int ret = PTR_ERR(ceph_msgr_wq);
-               pr_err("ceph_msgr_init failed to create workqueue: %d\n", ret);
+               pr_err("msgr_init failed to create workqueue: %d\n", ret);
                ceph_msgr_wq = NULL;
                return ret;
        }
@@ -167,7 +168,7 @@ static struct socket *ceph_tcp_connect(struct ceph_connection *con)
                ret = 0;
        }
        if (ret < 0) {
-               pr_err("ceph connect %u.%u.%u.%u:%u error %d\n",
+               pr_err("connect %u.%u.%u.%u:%u error %d\n",
                        IPQUADPORT(*(struct sockaddr_in *)paddr), ret);
                sock_release(sock);
                con->sock = NULL;
@@ -794,7 +795,7 @@ out:
 static int verify_hello(struct ceph_connection *con)
 {
        if (memcmp(con->in_banner, CEPH_BANNER, strlen(CEPH_BANNER))) {
-               pr_err("ceph connect to/from %u.%u.%u.%u:%u has bad banner\n",
+               pr_err("connect to/from %u.%u.%u.%u:%u has bad banner\n",
                       IPQUADPORT(con->peer_addr.ipaddr));
                con->error_msg = "protocol error, bad banner";
                return -1;
@@ -820,7 +821,7 @@ static int process_connect(struct ceph_connection *con)
              con->actual_peer_addr.ipaddr.sin_port ==
              con->peer_addr.ipaddr.sin_port &&
              con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
-               pr_err("ceph wrong peer, want %u.%u.%u.%u:%u/%d, "
+               pr_err("wrong peer, want %u.%u.%u.%u:%u/%d, "
                       "got %u.%u.%u.%u:%u/%d, wtf\n",
                       IPQUADPORT(con->peer_addr.ipaddr),
                       con->peer_addr.nonce,
@@ -849,7 +850,7 @@ static int process_connect(struct ceph_connection *con)
                dout("process_connect got BADPROTOVER my %d != their %d\n",
                     le32_to_cpu(con->out_connect.protocol_version),
                     le32_to_cpu(con->in_reply.protocol_version));
-               pr_err("ceph %s%lld %u.%u.%u.%u:%u protocol version mismatch,"
+               pr_err("%s%lld %u.%u.%u.%u:%u protocol version mismatch,"
                       " my %d != server's %d\n",
                       ENTITY_NAME(con->peer_name),
                       IPQUADPORT(con->peer_addr.ipaddr),
@@ -873,7 +874,7 @@ static int process_connect(struct ceph_connection *con)
                 */
                dout("process_connect got RESET peer seq %u\n",
                     le32_to_cpu(con->in_connect.connect_seq));
-               pr_err("ceph %s%lld %u.%u.%u.%u:%u connection reset\n",
+               pr_err("%s%lld %u.%u.%u.%u:%u connection reset\n",
                       ENTITY_NAME(con->peer_name),
                       IPQUADPORT(con->peer_addr.ipaddr));
                reset_connection(con);
@@ -940,7 +941,7 @@ static int process_connect(struct ceph_connection *con)
                pr_err("process_connect peer connecting WAIT\n");
 
        default:
-               pr_err("ceph connect protocol error, will retry\n");
+               pr_err("connect protocol error, will retry\n");
                con->error_msg = "protocol error, garbage tag during connect";
                return -1;
        }
@@ -1016,7 +1017,7 @@ static int read_partial_message(struct ceph_connection *con)
                        u32 crc = crc32c(0, (void *)&con->in_hdr,
                                 sizeof(con->in_hdr) - sizeof(con->in_hdr.crc));
                        if (crc != le32_to_cpu(con->in_hdr.crc)) {
-                               pr_err("ceph read_partial_message bad hdr "
+                               pr_err("read_partial_message bad hdr "
                                       " crc %u != expected %u\n",
                                       crc, con->in_hdr.crc);
                                return -EBADMSG;
@@ -1166,20 +1167,19 @@ no_data:
 
        /* crc ok? */
        if (con->in_front_crc != le32_to_cpu(m->footer.front_crc)) {
-               pr_err("ceph read_partial_message %p front crc %u != exp. %u\n",
+               pr_err("read_partial_message %p front crc %u != exp. %u\n",
                       m, con->in_front_crc, m->footer.front_crc);
                return -EBADMSG;
        }
        if (con->in_middle_crc != le32_to_cpu(m->footer.middle_crc)) {
-               pr_err("ceph read_partial_message %p middle crc %u != exp %u\n",
+               pr_err("read_partial_message %p middle crc %u != exp %u\n",
                       m, con->in_middle_crc, m->footer.middle_crc);
                return -EBADMSG;
        }
        if (datacrc &&
            (m->footer.flags & CEPH_MSG_FOOTER_NOCRC) == 0 &&
            con->in_data_crc != le32_to_cpu(m->footer.data_crc)) {
-               pr_err("ceph read_partial_message %p data crc %u != exp. %u\n",
-                      m,
+               pr_err("read_partial_message %p data crc %u != exp. %u\n", m,
                       con->in_data_crc, le32_to_cpu(m->footer.data_crc));
                return -EBADMSG;
        }
@@ -1430,7 +1430,7 @@ out:
        return ret;
 
 bad_tag:
-       pr_err("ceph try_read bad con->in_tag = %d\n", (int)con->in_tag);
+       pr_err("try_read bad con->in_tag = %d\n", (int)con->in_tag);
        con->error_msg = "protocol error, garbage tag";
        ret = -1;
        goto out;
@@ -1539,7 +1539,7 @@ out:
  */
 static void ceph_fault(struct ceph_connection *con)
 {
-       pr_err("ceph %s%lld %u.%u.%u.%u:%u %s\n", ENTITY_NAME(con->peer_name),
+       pr_err("%s%lld %u.%u.%u.%u:%u %s\n", ENTITY_NAME(con->peer_name),
               IPQUADPORT(con->peer_addr.ipaddr), con->error_msg);
        dout("fault %p state %lu to peer %u.%u.%u.%u:%u\n",
             con, con->state, IPQUADPORT(con->peer_addr.ipaddr));
@@ -1741,7 +1741,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len,
                        m->front.iov_base = kmalloc(front_len, GFP_NOFS);
                }
                if (m->front.iov_base == NULL) {
-                       pr_err("ceph_msg_new can't allocate %d bytes\n",
+                       pr_err("msg_new can't allocate %d bytes\n",
                             front_len);
                        goto out2;
                }
@@ -1764,7 +1764,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len,
 out2:
        ceph_msg_put(m);
 out:
-       pr_err("ceph_msg_new can't create type %d len %d\n", type, front_len);
+       pr_err("msg_new can't create type %d len %d\n", type, front_len);
        return ERR_PTR(-ENOMEM);
 }
 
@@ -1779,7 +1779,7 @@ struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con,
        struct ceph_msg *msg = ceph_msg_new(type, front_len, 0, 0, NULL);
 
        if (!msg) {
-               pr_err("ceph: unable to allocate msg type %d len %d\n",
+               pr_err("unable to allocate msg type %d len %d\n",
                       type, front_len);
                return ERR_PTR(-ENOMEM);
        }
index 25589860077d61534244376224768ec22475e79c..0cc913223853fbbd95214af5b6d31ae1f7d48df6 100644 (file)
@@ -1,10 +1,10 @@
+#include "ceph_debug.h"
 
 #include <linux/types.h>
 #include <linux/random.h>
 #include <linux/sched.h>
-#include "mon_client.h"
 
-#include "ceph_debug.h"
+#include "mon_client.h"
 #include "super.h"
 #include "decode.h"
 
@@ -208,7 +208,7 @@ static void handle_subscribe_ack(struct ceph_mon_client *monc,
        ceph_decode_32_safe(&p, end, seconds, bad);
        mutex_lock(&monc->mutex);
        if (monc->hunting) {
-               pr_info("ceph mon%d %u.%u.%u.%u:%u session established\n",
+               pr_info("mon%d %u.%u.%u.%u:%u session established\n",
                        monc->cur_mon, IPQUADPORT(monc->con->peer_addr.ipaddr));
                monc->hunting = false;
        }
@@ -218,7 +218,7 @@ static void handle_subscribe_ack(struct ceph_mon_client *monc,
        mutex_unlock(&monc->mutex);
        return;
 bad:
-       pr_err("ceph got corrupt subscribe-ack msg\n");
+       pr_err("got corrupt subscribe-ack msg\n");
 }
 
 /*
@@ -324,7 +324,7 @@ static void handle_mount_ack(struct ceph_mon_client *monc, struct ceph_msg *msg)
        ceph_decode_32_safe(&p, end, result, bad);
        ceph_decode_32_safe(&p, end, len, bad);
        if (result) {
-               pr_err("ceph mount denied: %.*s (%d)\n", len, (char *)p,
+               pr_err("mount denied: %.*s (%d)\n", len, (char *)p,
                       result);
                err = result;
                goto out;
@@ -335,7 +335,7 @@ static void handle_mount_ack(struct ceph_mon_client *monc, struct ceph_msg *msg)
        ceph_decode_need(&p, end, len, bad);
        monmap = ceph_monmap_decode(p, p + len);
        if (IS_ERR(monmap)) {
-               pr_err("ceph problem decoding monmap, %d\n",
+               pr_err("problem decoding monmap, %d\n",
                       (int)PTR_ERR(monmap));
                err = -EINVAL;
                goto out;
@@ -353,7 +353,7 @@ static void handle_mount_ack(struct ceph_mon_client *monc, struct ceph_msg *msg)
        client->whoami = cnum;
        client->msgr->inst.name.type = CEPH_ENTITY_TYPE_CLIENT;
        client->msgr->inst.name.num = cpu_to_le64(cnum);
-       pr_info("ceph client%lld fsid " FSID_FORMAT "\n",
+       pr_info("client%lld fsid " FSID_FORMAT "\n",
                client->whoami, PR_FSID(&client->monc.monmap->fsid));
 
        ceph_debugfs_client_init(client);
@@ -363,7 +363,7 @@ static void handle_mount_ack(struct ceph_mon_client *monc, struct ceph_msg *msg)
        goto out;
 
 bad:
-       pr_err("ceph error decoding mount_ack message\n");
+       pr_err("error decoding mount_ack message\n");
 out:
        client->mount_err = err;
        mutex_unlock(&monc->mutex);
@@ -400,7 +400,7 @@ static void handle_statfs_reply(struct ceph_mon_client *monc,
        return;
 
 bad:
-       pr_err("ceph corrupt statfs reply, no tid\n");
+       pr_err("corrupt statfs reply, no tid\n");
 }
 
 /*
@@ -452,7 +452,7 @@ int ceph_monc_do_statfs(struct ceph_mon_client *monc, struct ceph_statfs *buf)
        req.delay = BASE_DELAY_INTERVAL;
        if (radix_tree_insert(&monc->statfs_request_tree, req.tid, &req) < 0) {
                mutex_unlock(&monc->mutex);
-               pr_err("ceph ENOMEM in do_statfs\n");
+               pr_err("ENOMEM in do_statfs\n");
                return -ENOMEM;
        }
        monc->num_statfs_requests++;
@@ -621,7 +621,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
                break;
 
        default:
-               pr_err("ceph received unknown message type %d %s\n", type,
+               pr_err("received unknown message type %d %s\n", type,
                       ceph_msg_type_name(type));
        }
        ceph_msg_put(msg);
@@ -664,7 +664,7 @@ static void mon_fault(struct ceph_connection *con)
                goto out;
 
        if (monc->con && !monc->hunting)
-               pr_info("ceph mon%d %u.%u.%u.%u:%u session lost, "
+               pr_info("mon%d %u.%u.%u.%u:%u session lost, "
                        "hunting for new mon\n", monc->cur_mon,
                        IPQUADPORT(monc->con->peer_addr.ipaddr));
 
index 4c5a23bd99ff25900d1278dfc82f79968db503ca..39d4d7ed82ce5d0e5ca8d30cbeb0674e8b9adc35 100644 (file)
@@ -1,10 +1,10 @@
+#include "ceph_debug.h"
 
 #include <linux/err.h>
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/vmalloc.h>
 
-#include "ceph_debug.h"
 #include "msgpool.h"
 
 /*
index b7fca81d13756254c58abc4d9e52da6a1533f702..41cde0cf5bf8a6b50347c016c375cae80f78b634 100644 (file)
@@ -1,3 +1,5 @@
+#include "ceph_debug.h"
+
 #include <linux/err.h>
 #include <linux/highmem.h>
 #include <linux/mm.h>
@@ -5,7 +7,6 @@
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "osd_client.h"
 #include "messenger.h"
@@ -763,7 +764,7 @@ done:
        return;
 
 bad:
-       pr_err("ceph corrupt osd_op_reply got %d %d expected %d\n",
+       pr_err("corrupt osd_op_reply got %d %d expected %d\n",
               (int)msg->front.iov_len, le32_to_cpu(msg->hdr.front_len),
               (int)sizeof(*rhead));
 }
@@ -875,7 +876,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
        ceph_decode_need(&p, end, sizeof(fsid), bad);
        ceph_decode_copy(&p, &fsid, sizeof(fsid));
        if (ceph_fsid_compare(&fsid, &osdc->client->monc.monmap->fsid)) {
-               pr_err("ceph got osdmap with wrong fsid, ignoring\n");
+               pr_err("got osdmap with wrong fsid, ignoring\n");
                return;
        }
 
@@ -954,7 +955,7 @@ done:
        return;
 
 bad:
-       pr_err("ceph osdc handle_map corrupt msg\n");
+       pr_err("osdc handle_map corrupt msg\n");
        up_write(&osdc->map_sem);
        return;
 }
@@ -1244,7 +1245,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
                break;
 
        default:
-               pr_err("ceph received unknown message type %d %s\n", type,
+               pr_err("received unknown message type %d %s\n", type,
                       ceph_msg_type_name(type));
        }
        ceph_msg_put(msg);
index c84722907bbe815c3a1a723f5ffe6d039be63f03..a811d479eca9a53c01be46d8300d069db47047cc 100644 (file)
@@ -151,7 +151,7 @@ static struct crush_map *crush_decode(void *pbyval, void *end)
        ceph_decode_need(p, end, 4*sizeof(u32), bad);
        ceph_decode_32(p, magic);
        if (magic != CRUSH_MAGIC) {
-               pr_err("ceph crush_decode magic %x != current %x\n",
+               pr_err("crush_decode magic %x != current %x\n",
                       (unsigned)magic, (unsigned)CRUSH_MAGIC);
                goto bad;
        }
@@ -617,7 +617,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
                struct ceph_entity_addr addr;
                ceph_decode_32_safe(p, end, osd, bad);
                ceph_decode_copy_safe(p, end, &addr, sizeof(addr), bad);
-               pr_info("ceph osd%d up\n", osd);
+               pr_info("osd%d up\n", osd);
                BUG_ON(osd >= map->max_osd);
                map->osd_state[osd] |= CEPH_OSD_UP;
                map->osd_addr[osd] = addr;
@@ -641,7 +641,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
                ceph_decode_need(p, end, sizeof(u32)*2, bad);
                ceph_decode_32(p, osd);
                ceph_decode_32(p, off);
-               pr_info("ceph osd%d weight 0x%x %s\n", osd, off,
+               pr_info("osd%d weight 0x%x %s\n", osd, off,
                     off == CEPH_OSD_IN ? "(in)" :
                     (off == CEPH_OSD_OUT ? "(out)" : ""));
                if (osd < map->max_osd)
@@ -699,7 +699,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
        return map;
 
 bad:
-       pr_err("ceph corrupt inc osdmap epoch %d off %d (%p of %p-%p)\n",
+       pr_err("corrupt inc osdmap epoch %d off %d (%p of %p-%p)\n",
               epoch, (int)(*p - start), *p, start, end);
        if (newcrush)
                crush_destroy(newcrush);
@@ -830,7 +830,7 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, union ceph_pg pgid,
        ruleno = crush_find_rule(osdmap->crush, pool->v.crush_ruleset,
                                 pool->v.type, pool->v.size);
        if (ruleno < 0) {
-               pr_err("ceph no crush rule pool %d type %d size %d\n",
+               pr_err("no crush rule pool %d type %d size %d\n",
                       pgid.pg.pool, pool->v.type, pool->v.size);
                return NULL;
        }
index b4d78926b78a99ca2f11a541074efebc7325c6de..2e3cb40b7e48f620f9d578296fbfa530ef60f4ef 100644 (file)
@@ -1,8 +1,8 @@
+#include "ceph_debug.h"
 
 #include <linux/radix-tree.h>
 #include <linux/sort.h>
 
-#include "ceph_debug.h"
 #include "super.h"
 #include "decode.h"
 
@@ -347,7 +347,7 @@ fail:
                ceph_put_snap_context(realm->cached_context);
                realm->cached_context = NULL;
        }
-       pr_err("ceph build_snap_context %llx %p fail %d\n", realm->ino,
+       pr_err("build_snap_context %llx %p fail %d\n", realm->ino,
               realm, err);
        return err;
 }
@@ -412,7 +412,7 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci,
 
        capsnap = kzalloc(sizeof(*capsnap), GFP_NOFS);
        if (!capsnap) {
-               pr_err("ceph ENOMEM allocating ceph_cap_snap on %p\n", inode);
+               pr_err("ENOMEM allocating ceph_cap_snap on %p\n", inode);
                return;
        }
 
@@ -637,7 +637,7 @@ more:
 bad:
        err = -EINVAL;
 fail:
-       pr_err("ceph update_snap_trace error %d\n", err);
+       pr_err("update_snap_trace error %d\n", err);
        return err;
 }
 
@@ -886,7 +886,7 @@ split_skip_inode:
        return;
 
 bad:
-       pr_err("ceph corrupt snap message from mds%d\n", mds);
+       pr_err("corrupt snap message from mds%d\n", mds);
 out:
        if (locked_rwsem)
                up_write(&mdsc->snap_rwsem);
index 3a01ffd21183090604ed515ef36bbeb5548f2c0e..d9064f5572bb94415a120deea6543fef675c7bf9 100644 (file)
@@ -1,3 +1,6 @@
+
+#include "ceph_debug.h"
+
 #include <linux/backing-dev.h>
 #include <linux/fs.h>
 #include <linux/inet.h>
@@ -12,7 +15,6 @@
 #include <linux/version.h>
 #include <linux/vmalloc.h>
 
-#include "ceph_debug.h"
 #include "ceph_ver.h"
 #include "decode.h"
 #include "super.h"
@@ -390,7 +392,7 @@ static int parse_ips(const char *c, const char *end,
        return 0;
 
 bad:
-       pr_err("ceph parse_ips bad ip '%s'\n", c);
+       pr_err("parse_ips bad ip '%s'\n", c);
        return -EINVAL;
 }
 
@@ -425,7 +427,7 @@ static int parse_mount_args(struct ceph_client *client,
                return -EINVAL;
        *path = strstr(dev_name, ":/");
        if (*path == NULL) {
-               pr_err("ceph device name is missing path (no :/ in %s)\n",
+               pr_err("device name is missing path (no :/ in %s)\n",
                       dev_name);
                return -EINVAL;
        }
@@ -468,14 +470,14 @@ static int parse_mount_args(struct ceph_client *client,
                        continue;
                token = match_token((char *)c, arg_tokens, argstr);
                if (token < 0) {
-                       pr_err("ceph bad mount option at '%s'\n", c);
+                       pr_err("bad mount option at '%s'\n", c);
                        return -EINVAL;
 
                }
                if (token < Opt_ip) {
                        ret = match_int(&argstr[0], &intval);
                        if (ret < 0) {
-                               pr_err("ceph bad mount option arg (not int) "
+                               pr_err("bad mount option arg (not int) "
                                       "at '%s'\n", c);
                                continue;
                        }
@@ -992,7 +994,7 @@ static int __init init_ceph(void)
 {
        int ret = 0;
 
-       pr_info("ceph init (%s)\n", STRINGIFY(CEPH_GIT_VER));
+       pr_info("init (%s)\n", STRINGIFY(CEPH_GIT_VER));
 
        ret = ceph_debugfs_init();
        if (ret < 0)
index ad54e7e764ae795c45f770379a2adc28b6606fb6..15544321cd0cee10043e7bfd00b2ab478053dbe4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _FS_CEPH_SUPER_H
 #define _FS_CEPH_SUPER_H
 
+#include "ceph_debug.h"
+
 #include <asm/unaligned.h>
 #include <linux/backing-dev.h>
 #include <linux/completion.h>
@@ -11,7 +13,6 @@
 #include <linux/wait.h>
 
 #include "types.h"
-#include "ceph_debug.h"
 #include "messenger.h"
 #include "msgpool.h"
 #include "mon_client.h"