From ec111ccc442439f68e9052721571ec8ef1754644 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 17 Jan 2003 06:46:39 +0000 Subject: [PATCH] vol-clone-inc-failure-logging-20030117 log info in event of assert ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== same change for IH_DEC --- src/vol/clone.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/vol/clone.c b/src/vol/clone.c index db5f35bf1..00115595f 100644 --- a/src/vol/clone.c +++ b/src/vol/clone.c @@ -237,8 +237,13 @@ afs_int32 DoCloneIndex(rwvp, clvp, class, reclone) if (clinode && (clinode == rwinode)) { clinode = 0; /* already cloned - don't delete later */ } else if (rwinode) { - assert(IH_INC(V_linkHandle(rwvp), rwinode, V_parentId(rwvp)) != -1); - inodeinced = 1; + if (IH_INC(V_linkHandle(rwvp), rwinode, V_parentId(rwvp)) == -1) { + Log("IH_INC failed: %x, %s, %d errno %d\n", + V_linkHandle(rwvp), PrintInode(NULL, rwinode), + V_parentId(rwvp), errno); + assert(0); + } + inodeinced = 1; } /* If a directory, mark vnode in old volume as cloned */ @@ -280,7 +285,12 @@ afs_int32 DoCloneIndex(rwvp, clvp, class, reclone) clonefailed: /* Couldn't clone, go back and decrement the inode's link count */ if (inodeinced) { - assert(IH_DEC(V_linkHandle(rwvp), rwinode, V_parentId(rwvp)) != -1); + if (IH_DEC(V_linkHandle(rwvp), rwinode, V_parentId(rwvp)) == -1) { + Log("IH_DEC failed: %x, %s, %d errno %d\n", + V_linkHandle(rwvp), PrintInode(NULL, rwinode), + V_parentId(rwvp), errno); + assert(0); + } } /* And if the directory was marked clone, unmark it */ if (dircloned) { -- 2.39.5