[PATCH] ceph: print more information when we can't find snaprealm during ceph_add_cap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

URL: https://tracker.ceph.com/issues/46419
Suggested-by: Sage Weil <sage@xxxxxxxxxx>
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 fs/ceph/caps.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index cecd4f66a60d..b4c3546def01 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("ceph_add_cap: couldn't find snap realm 0x%llx (ino 0x%llx oldrealm 0x%llx)\n",
+			     realmino, ci->vino.ino,
+			     ci->i_snap_realm ? ci->i_snap_realm->ino : 0);
 	}
 
 	__check_cap_issue(ci, cap, issued);
-- 
2.31.1




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux