aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-08-02 15:32:47 -0400
committerIlya Dryomov <idryomov@gmail.com>2021-09-02 22:49:17 +0200
commit692e17159792a13e8c5031bdc0ae9b0f3158593d (patch)
treecaf7a95bfb1ad5993f23eb1ff749baaff305f1cf /fs/ceph
parentceph: add ceph_change_snap_realm() helper (diff)
downloadlinux-dev-692e17159792a13e8c5031bdc0ae9b0f3158593d.tar.xz
linux-dev-692e17159792a13e8c5031bdc0ae9b0f3158593d.zip
ceph: print more information when we can't find snaprealm
Print a bit more information when we can't find the realm during ceph_add_cap. Show both the inode number and the old realm inode number. Suggested-by: Sage Weil <sage@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index b75a9e1d6882..1f544eeecf79 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -703,13 +703,12 @@ void ceph_add_cap(struct inode *inode,
*/
struct ceph_snap_realm *realm = ceph_lookup_snap_realm(mdsc,
realmino);
- if (realm) {
+ if (realm)
ceph_change_snap_realm(inode, realm);
- } else {
- pr_err("ceph_add_cap: couldn't find snap realm %llx\n",
- realmino);
- WARN_ON(!realm);
- }
+ else
+ WARN(1, "%s: couldn't find snap realm 0x%llx (ino 0x%llx oldrealm 0x%llx)\n",
+ __func__, realmino, ci->i_vino.ino,
+ ci->i_snap_realm ? ci->i_snap_realm->ino : 0);
}
__check_cap_issue(ci, cap, issued);