Commit 6407fbb9 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: print inode numbers instead of pointer values

We have a lot of log messages that print inode pointer values. This is
of dubious utility. Switch a random assortment of the ones I've found
most useful to use ceph_vinop to print the snap:inum tuple instead.

[ idryomov: use . as a separator, break unnecessarily long lines ]
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent f7a67b46
...@@ -1968,8 +1968,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, ...@@ -1968,8 +1968,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags,
} }
} }
dout("check_caps %p file_want %s used %s dirty %s flushing %s" dout("check_caps %llx.%llx file_want %s used %s dirty %s flushing %s"
" issued %s revoking %s retain %s %s%s\n", inode, " issued %s revoking %s retain %s %s%s\n", ceph_vinop(inode),
ceph_cap_string(file_wanted), ceph_cap_string(file_wanted),
ceph_cap_string(used), ceph_cap_string(ci->i_dirty_caps), ceph_cap_string(used), ceph_cap_string(ci->i_dirty_caps),
ceph_cap_string(ci->i_flushing_caps), ceph_cap_string(ci->i_flushing_caps),
...@@ -1990,7 +1990,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, ...@@ -1990,7 +1990,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags,
(revoking & (CEPH_CAP_FILE_CACHE| (revoking & (CEPH_CAP_FILE_CACHE|
CEPH_CAP_FILE_LAZYIO)) && /* or revoking cache */ CEPH_CAP_FILE_LAZYIO)) && /* or revoking cache */
!tried_invalidate) { !tried_invalidate) {
dout("check_caps trying to invalidate on %p\n", inode); dout("check_caps trying to invalidate on %llx.%llx\n",
ceph_vinop(inode));
if (try_nonblocking_invalidate(inode) < 0) { if (try_nonblocking_invalidate(inode) < 0) {
dout("check_caps queuing invalidate\n"); dout("check_caps queuing invalidate\n");
queue_invalidate = true; queue_invalidate = true;
...@@ -4315,7 +4316,7 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s) ...@@ -4315,7 +4316,7 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s)
i_dirty_item); i_dirty_item);
inode = &ci->vfs_inode; inode = &ci->vfs_inode;
ihold(inode); ihold(inode);
dout("flush_dirty_caps %p\n", inode); dout("flush_dirty_caps %llx.%llx\n", ceph_vinop(inode));
spin_unlock(&mdsc->cap_dirty_lock); spin_unlock(&mdsc->cap_dirty_lock);
ceph_check_caps(ci, CHECK_CAPS_FLUSH, NULL); ceph_check_caps(ci, CHECK_CAPS_FLUSH, NULL);
iput(inode); iput(inode);
......
...@@ -556,7 +556,7 @@ static void ceph_async_create_cb(struct ceph_mds_client *mdsc, ...@@ -556,7 +556,7 @@ static void ceph_async_create_cb(struct ceph_mds_client *mdsc,
} }
ceph_kick_flushing_inode_caps(req->r_session, ci); ceph_kick_flushing_inode_caps(req->r_session, ci);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
} else { } else if (!result) {
pr_warn("%s: no req->r_target_inode for 0x%llx\n", __func__, pr_warn("%s: no req->r_target_inode for 0x%llx\n", __func__,
req->r_deleg_ino); req->r_deleg_ino);
} }
......
...@@ -1848,8 +1848,8 @@ static void ceph_do_invalidate_pages(struct inode *inode) ...@@ -1848,8 +1848,8 @@ static void ceph_do_invalidate_pages(struct inode *inode)
mutex_lock(&ci->i_truncate_mutex); mutex_lock(&ci->i_truncate_mutex);
if (READ_ONCE(fsc->mount_state) >= CEPH_MOUNT_SHUTDOWN) { if (READ_ONCE(fsc->mount_state) >= CEPH_MOUNT_SHUTDOWN) {
pr_warn_ratelimited("invalidate_pages %p %lld forced umount\n", pr_warn_ratelimited("%s: inode %llx.%llx is shut down\n",
inode, ceph_ino(inode)); __func__, ceph_vinop(inode));
mapping_set_error(inode->i_mapping, -EIO); mapping_set_error(inode->i_mapping, -EIO);
truncate_pagecache(inode, 0); truncate_pagecache(inode, 0);
mutex_unlock(&ci->i_truncate_mutex); mutex_unlock(&ci->i_truncate_mutex);
...@@ -1871,7 +1871,8 @@ static void ceph_do_invalidate_pages(struct inode *inode) ...@@ -1871,7 +1871,8 @@ static void ceph_do_invalidate_pages(struct inode *inode)
ceph_fscache_invalidate(inode); ceph_fscache_invalidate(inode);
if (invalidate_inode_pages2(inode->i_mapping) < 0) { if (invalidate_inode_pages2(inode->i_mapping) < 0) {
pr_err("invalidate_pages %p fails\n", inode); pr_err("invalidate_inode_pages2 %llx.%llx failed\n",
ceph_vinop(inode));
} }
spin_lock(&ci->i_ceph_lock); spin_lock(&ci->i_ceph_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment