Here is a patch that should fix the oops.  If you see the problem again,
you should get the XT_GETPAGE error in the error log and the filesystem
should become read-only until fsck is run against it to fix it.

Did fsck clean the filesystem, or is it still unmounted?  If fsck hasn't
fixed it, I would be interested in the output of "fsck -nv" run against
it, but I image it's probably too late for that.

===== fs/jfs/jfs_xtree.c 1.14 vs edited =====
--- 1.14/fs/jfs/jfs_xtree.c     2004-03-24 14:11:46 -06:00
+++ edited/fs/jfs/jfs_xtree.c   2004-06-25 14:44:58 -05:00
@@ -1071,8 +1071,10 @@
                 */
                /* get/pin the parent page <sp> */
                XT_GETPAGE(ip, parent->bn, smp, PSIZE, sp, rc);
-               if (rc)
-                       goto errout2;
+               if (rc) {
+                       XT_PUTPAGE(rcmp);
+                       return rc;
+               }
 
                /*
                 * The new key entry goes ONE AFTER the index of parent entry,
@@ -1106,8 +1108,10 @@
                        rc = (sp->header.flag & BT_ROOT) ?
                            xtSplitRoot(tid, ip, split, &rmp) :
                            xtSplitPage(tid, ip, split, &rmp, &rbn);
-                       if (rc)
-                               goto errout1;
+                       if (rc) {
+                               XT_PUTPAGE(smp);
+                               return rc;
+                       }
 
                        XT_PUTPAGE(smp);
                        /* keep new child page <rp> pinned */
@@ -1170,19 +1174,6 @@
        XT_PUTPAGE(rmp);
 
        return 0;
-
-       /*
-        * If something fails in the above loop we were already walking back
-        * up the tree and the tree is now inconsistent.
-        * release all pages we're holding.
-        */
-      errout1:
-       XT_PUTPAGE(smp);
-
-      errout2:
-       XT_PUTPAGE(rcmp);
-
-       return rc;
 }
 
 


_______________________________________________
Jfs-discussion mailing list
[EMAIL PROTECTED]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion

Reply via email to