Commit 692e1715 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

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: default avatarSage Weil <sage@redhat.com>
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 0ba92e1c
...@@ -703,13 +703,12 @@ void ceph_add_cap(struct inode *inode, ...@@ -703,13 +703,12 @@ void ceph_add_cap(struct inode *inode,
*/ */
struct ceph_snap_realm *realm = ceph_lookup_snap_realm(mdsc, struct ceph_snap_realm *realm = ceph_lookup_snap_realm(mdsc,
realmino); realmino);
if (realm) { if (realm)
ceph_change_snap_realm(inode, realm); ceph_change_snap_realm(inode, realm);
} else { else
pr_err("ceph_add_cap: couldn't find snap realm %llx\n", WARN(1, "%s: couldn't find snap realm 0x%llx (ino 0x%llx oldrealm 0x%llx)\n",
realmino); __func__, realmino, ci->i_vino.ino,
WARN_ON(!realm); ci->i_snap_realm ? ci->i_snap_realm->ino : 0);
}
} }
__check_cap_issue(ci, cap, issued); __check_cap_issue(ci, cap, issued);
......
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