summaryrefslogtreecommitdiff
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2023-06-12 04:04:07 +0300
committerIlya Dryomov <idryomov@gmail.com>2023-11-04 01:28:33 +0300
commit38d46409c4639a1d659ebfa70e27a8bed6b8ee1d (patch)
tree60d9659430103368ee2ab12a1e215e54b6a05d4e /fs/ceph/super.h
parent5995d90d2d19f337df6a50bcf4699ef053214dac (diff)
downloadlinux-38d46409c4639a1d659ebfa70e27a8bed6b8ee1d.tar.xz
ceph: print cluster fsid and client global_id in all debug logs
Multiple CephFS mounts on a host is increasingly common so disambiguating messages like this is necessary and will make it easier to debug issues. At the same this will improve the debug logs to make them easier to troubleshooting issues, such as print the ino# instead only printing the memory addresses of the corresponding inodes and print the dentry names instead of the corresponding memory addresses for the dentry,etc. Link: https://tracker.ceph.com/issues/61590 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 8efd4ba60774..983bf9ab3bd5 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -505,6 +505,12 @@ ceph_sb_to_mdsc(const struct super_block *sb)
return (struct ceph_mds_client *)ceph_sb_to_fs_client(sb)->mdsc;
}
+static inline struct ceph_client *
+ceph_inode_to_client(const struct inode *inode)
+{
+ return (struct ceph_client *)ceph_inode_to_fs_client(inode)->client;
+}
+
static inline struct ceph_vino
ceph_vino(const struct inode *inode)
{