DEVEL15-avoid-assert-for-missing-vnodes-20060921
authorDerrick Brashear <shadow@dementia.org>
Thu, 21 Sep 2006 12:51:10 +0000 (12:51 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 21 Sep 2006 12:51:10 +0000 (12:51 +0000)
right now if a vnode is missing when we try to clone, we could assert. ick.

(cherry picked from commit b613480bd5eb6bc2a14c4e23229d90105291944c)

src/vol/clone.c

index df4a0f1..093c77b 100644 (file)
@@ -262,7 +262,8 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone)
                    Log("IH_INC failed: %x, %s, %u errno %d\n",
                        V_linkHandle(rwvp), PrintInode(NULL, rwinode),
                        V_parentId(rwvp), errno);
-                   assert(0);
+                   VForceOffline_r(rwvp);
+                   ERROR_EXIT(EIO);
                }
                inodeinced = 1;
            }
@@ -314,7 +315,8 @@ DoCloneIndex(Volume * rwvp, Volume * clvp, VnodeClass class, int reclone)
                    Log("IH_DEC failed: %x, %s, %u errno %d\n",
                        V_linkHandle(rwvp), PrintInode(NULL, rwinode),
                        V_parentId(rwvp), errno);
-                   assert(0);
+                   VForceOffline_r(rwvp);
+                   ERROR_EXIT(EIO);
                }
            }
            /* And if the directory was marked clone, unmark it */