ceph: add newline to end of debug message format

Some of dout format do not include newline in the end,
fix for the files which are in fs/ceph and net/ceph directories,
and changing printk to dout for printing debug info in super.c

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Chengguang Xu 2018-01-30 16:29:17 +08:00 committed by Ilya Dryomov
parent b133185217
commit 4c069a5821
7 changed files with 19 additions and 20 deletions

View File

@ -190,7 +190,7 @@ static enum fscache_checkaux ceph_fscache_inode_check_aux(
if (memcmp(data, &aux, sizeof(aux)) != 0) if (memcmp(data, &aux, sizeof(aux)) != 0)
return FSCACHE_CHECKAUX_OBSOLETE; return FSCACHE_CHECKAUX_OBSOLETE;
dout("ceph inode 0x%p cached okay", ci); dout("ceph inode 0x%p cached okay\n", ci);
return FSCACHE_CHECKAUX_OKAY; return FSCACHE_CHECKAUX_OKAY;
} }

View File

@ -451,7 +451,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
fi->dir_ordered_count = req->r_dir_ordered_cnt; fi->dir_ordered_count = req->r_dir_ordered_cnt;
} }
} else { } else {
dout("readdir !did_prepopulate"); dout("readdir !did_prepopulate\n");
/* disable readdir cache */ /* disable readdir cache */
fi->readdir_cache_idx = -1; fi->readdir_cache_idx = -1;
/* preclude from marking dir complete */ /* preclude from marking dir complete */

View File

@ -41,7 +41,7 @@ static __le32 ceph_flags_sys2wire(u32 flags)
#undef ceph_sys2wire #undef ceph_sys2wire
if (flags) if (flags)
dout("unused open flags: %x", flags); dout("unused open flags: %x\n", flags);
return cpu_to_le32(wire_flags); return cpu_to_le32(wire_flags);
} }

View File

@ -95,7 +95,7 @@ static int ceph_lock_message(u8 lock_type, u16 operation, struct inode *inode,
owner = secure_addr(fl->fl_owner); owner = secure_addr(fl->fl_owner);
dout("ceph_lock_message: rule: %d, op: %d, owner: %llx, pid: %llu, " dout("ceph_lock_message: rule: %d, op: %d, owner: %llx, pid: %llu, "
"start: %llu, length: %llu, wait: %d, type: %d", (int)lock_type, "start: %llu, length: %llu, wait: %d, type: %d\n", (int)lock_type,
(int)operation, owner, (u64)fl->fl_pid, fl->fl_start, length, (int)operation, owner, (u64)fl->fl_pid, fl->fl_start, length,
wait, fl->fl_type); wait, fl->fl_type);
@ -132,7 +132,7 @@ static int ceph_lock_message(u8 lock_type, u16 operation, struct inode *inode,
} }
ceph_mdsc_put_request(req); ceph_mdsc_put_request(req);
dout("ceph_lock_message: rule: %d, op: %d, pid: %llu, start: %llu, " dout("ceph_lock_message: rule: %d, op: %d, pid: %llu, start: %llu, "
"length: %llu, wait: %d, type: %d, err code %d", (int)lock_type, "length: %llu, wait: %d, type: %d, err code %d\n", (int)lock_type,
(int)operation, (u64)fl->fl_pid, fl->fl_start, (int)operation, (u64)fl->fl_pid, fl->fl_start,
length, wait, fl->fl_type, err); length, wait, fl->fl_type, err);
return err; return err;
@ -226,7 +226,7 @@ int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK)
return -ENOLCK; return -ENOLCK;
dout("ceph_lock, fl_owner: %p", fl->fl_owner); dout("ceph_lock, fl_owner: %p\n", fl->fl_owner);
/* set wait bit as appropriate, then make command as Ceph expects it*/ /* set wait bit as appropriate, then make command as Ceph expects it*/
if (IS_GETLK(cmd)) if (IS_GETLK(cmd))
@ -264,7 +264,7 @@ int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
err = ceph_lock_message(CEPH_LOCK_FCNTL, op, inode, lock_cmd, wait, fl); err = ceph_lock_message(CEPH_LOCK_FCNTL, op, inode, lock_cmd, wait, fl);
if (!err) { if (!err) {
if (op == CEPH_MDS_OP_SETFILELOCK) { if (op == CEPH_MDS_OP_SETFILELOCK) {
dout("mds locked, locking locally"); dout("mds locked, locking locally\n");
err = posix_lock_file(file, fl, NULL); err = posix_lock_file(file, fl, NULL);
if (err) { if (err) {
/* undo! This should only happen if /* undo! This should only happen if
@ -272,7 +272,7 @@ int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
* deadlock. */ * deadlock. */
ceph_lock_message(CEPH_LOCK_FCNTL, op, inode, ceph_lock_message(CEPH_LOCK_FCNTL, op, inode,
CEPH_LOCK_UNLOCK, 0, fl); CEPH_LOCK_UNLOCK, 0, fl);
dout("got %d on posix_lock_file, undid lock", dout("got %d on posix_lock_file, undid lock\n",
err); err);
} }
} }
@ -294,7 +294,7 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
if (fl->fl_type & LOCK_MAND) if (fl->fl_type & LOCK_MAND)
return -EOPNOTSUPP; return -EOPNOTSUPP;
dout("ceph_flock, fl_file: %p", fl->fl_file); dout("ceph_flock, fl_file: %p\n", fl->fl_file);
spin_lock(&ci->i_ceph_lock); spin_lock(&ci->i_ceph_lock);
if (ci->i_ceph_flags & CEPH_I_ERROR_FILELOCK) { if (ci->i_ceph_flags & CEPH_I_ERROR_FILELOCK) {
@ -329,7 +329,7 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
ceph_lock_message(CEPH_LOCK_FLOCK, ceph_lock_message(CEPH_LOCK_FLOCK,
CEPH_MDS_OP_SETFILELOCK, CEPH_MDS_OP_SETFILELOCK,
inode, CEPH_LOCK_UNLOCK, 0, fl); inode, CEPH_LOCK_UNLOCK, 0, fl);
dout("got %d on locks_lock_file_wait, undid lock", err); dout("got %d on locks_lock_file_wait, undid lock\n", err);
} }
} }
return err; return err;
@ -356,7 +356,7 @@ void ceph_count_locks(struct inode *inode, int *fcntl_count, int *flock_count)
++(*flock_count); ++(*flock_count);
spin_unlock(&ctx->flc_lock); spin_unlock(&ctx->flc_lock);
} }
dout("counted %d flock locks and %d fcntl locks", dout("counted %d flock locks and %d fcntl locks\n",
*flock_count, *fcntl_count); *flock_count, *fcntl_count);
} }
@ -384,7 +384,7 @@ static int lock_to_ceph_filelock(struct file_lock *lock,
cephlock->type = CEPH_LOCK_UNLOCK; cephlock->type = CEPH_LOCK_UNLOCK;
break; break;
default: default:
dout("Have unknown lock type %d", lock->fl_type); dout("Have unknown lock type %d\n", lock->fl_type);
err = -EINVAL; err = -EINVAL;
} }
@ -407,7 +407,7 @@ int ceph_encode_locks_to_buffer(struct inode *inode,
int seen_flock = 0; int seen_flock = 0;
int l = 0; int l = 0;
dout("encoding %d flock and %d fcntl locks", num_flock_locks, dout("encoding %d flock and %d fcntl locks\n", num_flock_locks,
num_fcntl_locks); num_fcntl_locks);
if (!ctx) if (!ctx)

View File

@ -384,7 +384,7 @@ static struct ceph_mds_session *get_session(struct ceph_mds_session *s)
refcount_read(&s->s_ref)-1, refcount_read(&s->s_ref)); refcount_read(&s->s_ref)-1, refcount_read(&s->s_ref));
return s; return s;
} else { } else {
dout("mdsc get_session %p 0 -- FAIL", s); dout("mdsc get_session %p 0 -- FAIL\n", s);
return NULL; return NULL;
} }
} }
@ -2531,10 +2531,10 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
* Otherwise we just have to return an ESTALE * Otherwise we just have to return an ESTALE
*/ */
if (result == -ESTALE) { if (result == -ESTALE) {
dout("got ESTALE on request %llu", req->r_tid); dout("got ESTALE on request %llu\n", req->r_tid);
req->r_resend_mds = -1; req->r_resend_mds = -1;
if (req->r_direct_mode != USE_AUTH_MDS) { if (req->r_direct_mode != USE_AUTH_MDS) {
dout("not using auth, setting for that now"); dout("not using auth, setting for that now\n");
req->r_direct_mode = USE_AUTH_MDS; req->r_direct_mode = USE_AUTH_MDS;
__do_request(mdsc, req); __do_request(mdsc, req);
mutex_unlock(&mdsc->mutex); mutex_unlock(&mdsc->mutex);
@ -2542,13 +2542,13 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
} else { } else {
int mds = __choose_mds(mdsc, req); int mds = __choose_mds(mdsc, req);
if (mds >= 0 && mds != req->r_session->s_mds) { if (mds >= 0 && mds != req->r_session->s_mds) {
dout("but auth changed, so resending"); dout("but auth changed, so resending\n");
__do_request(mdsc, req); __do_request(mdsc, req);
mutex_unlock(&mdsc->mutex); mutex_unlock(&mdsc->mutex);
goto out; goto out;
} }
} }
dout("have to return ESTALE on request %llu", req->r_tid); dout("have to return ESTALE on request %llu\n", req->r_tid);
} }

View File

@ -320,7 +320,6 @@ static int parse_fsopt_token(char *c, void *private)
break; break;
case Opt_poolperm: case Opt_poolperm:
fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM; fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM;
printk ("pool perm");
break; break;
case Opt_nopoolperm: case Opt_nopoolperm:
fsopt->flags |= CEPH_MOUNT_OPT_NOPOOLPERM; fsopt->flags |= CEPH_MOUNT_OPT_NOPOOLPERM;

View File

@ -217,7 +217,7 @@ static int parse_fsid(const char *str, struct ceph_fsid *fsid)
if (i == 16) if (i == 16)
err = 0; err = 0;
dout("parse_fsid ret %d got fsid %pU", err, fsid); dout("parse_fsid ret %d got fsid %pU\n", err, fsid);
return err; return err;
} }