viced-copyonwrite-give-useful-error-messages-when-taking-volumes-offline-20010720
[openafs.git] / src / viced / afsfileprocs.c
index 403c5b5..5a1cef1 100644 (file)
@@ -25,8 +25,8 @@
  * privilege"? 
  */
 
-#include <afs/param.h>
 #include <afsconfig.h>
+#include <afs/param.h>
 
 RCSID("$Header$");
 
@@ -6403,17 +6403,19 @@ 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));
-                   /* Decrement this inode so salvager doesn't find it. */
+                   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);
                    FDH_REALLYCLOSE(targFdP);