Skip to content

Commit

Permalink
ceph: print more information when we can't find snaprealm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Layton authored and Ilya Dryomov committed Sep 2, 2021
1 parent 0ba92e1 commit 692e171
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 692e171

Please sign in to comment.