]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Better copyonwrite error handling
authorSam Hartman <hartmans@debian.org>
Fri, 20 Jul 2001 11:50:35 +0000 (11:50 +0000)
committerSam Hartman <hartmans@debian.org>
Fri, 20 Jul 2001 11:50:35 +0000 (11:50 +0000)
debian/patch.002_viced_debugging [new file with mode: 0644]
src/viced/afsfileprocs.c

diff --git a/debian/patch.002_viced_debugging b/debian/patch.002_viced_debugging
new file mode 100644 (file)
index 0000000..1a5dbba
--- /dev/null
@@ -0,0 +1,28 @@
+Index: src/viced//afsfileprocs.c
+===================================================================
+RCS file: /afs/sipb/project/openafs/debian/cvs/openafs/src/viced/afsfileprocs.c,v
+retrieving revision 1.1.1.6
+diff -u -r1.1.1.6 afsfileprocs.c
+--- src/viced//afsfileprocs.c  14 Jul 2001 22:24:45 -0000      1.1.1.6
++++ src/viced//afsfileprocs.c  20 Jul 2001 09:56:14 -0000
+@@ -6403,16 +6403,16 @@
+                       rc = IH_DEC(V_linkHandle(volptr), ino,
+                                 V_parentId(volptr));
+                       if (!rc ) {
+-                          ViceLog(0,("CopyOnWrite failed: volume %u in partition %s needs salvage\n",
+-                                  V_id(volptr), volptr->partition->name));
++                          ViceLog(0,("CopyOnWrite failed: error %u after i_dec on disk full, volume %u in partition %s needs salvage\n",
++                                  rc, V_id(volptr), volptr->partition->name));
+                           VTakeOffline (volptr);
+                       }
+                       free(buff);
+                       return ENOSPC;
+               }
+               else {
+-                  ViceLog(0,("CopyOnWrite failed: volume %u in partition %s needs salvage\n",
+-                          V_id(volptr), volptr->partition->name));
++                  ViceLog(0,("CopyOnWrite failed: volume %u in partition %s  (tried reading %u, read %u, wrote %u, errno %u) volume needs salvage\n",
++                          V_id(volptr), volptr->partition->name, length, rdlen, wrlen, errno));
+                   /* Decrement this inode so salvager doesn't find it. */
+                   FDH_REALLYCLOSE(newFdP);
+                   IH_RELEASE(newH);
index 1d98b46ebeb69d159e35e6fc475ce049c12a9494..7e96df3407831b0a054aefacd0cfdef76a0dffce 100644 (file)
@@ -28,7 +28,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID("$Header: /tmp/cvstemp/openafs/src/viced/afsfileprocs.c,v 1.1.1.6 2001/07/14 22:24:45 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/viced/afsfileprocs.c,v 1.2 2001/07/20 11:50:35 hartmans Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -6403,16 +6403,16 @@ int CopyOnWrite(targetptr, volptr)
                        rc = IH_DEC(V_linkHandle(volptr), ino,
                                  V_parentId(volptr));
                        if (!rc ) {
-                           ViceLog(0,("CopyOnWrite failed: volume %u in partition %s needs salvage\n",
-                                   V_id(volptr), volptr->partition->name));
+                           ViceLog(0,("CopyOnWrite failed: error %u after i_dec on disk full, volume %u in partition %s needs salvage\n",
+                                   rc, V_id(volptr), volptr->partition->name));
                            VTakeOffline (volptr);
                        }
                        free(buff);
                        return ENOSPC;
                }
                else {
-                   ViceLog(0,("CopyOnWrite failed: volume %u in partition %s needs salvage\n",
-                           V_id(volptr), volptr->partition->name));
+                   ViceLog(0,("CopyOnWrite failed: volume %u in partition %s  (tried reading %u, read %u, wrote %u, errno %u) volume needs salvage\n",
+                           V_id(volptr), volptr->partition->name, length, rdlen, wrlen, errno));
                    /* Decrement this inode so salvager doesn't find it. */
                    FDH_REALLYCLOSE(newFdP);
                    IH_RELEASE(newH);