From 158243091c2600529e740b7e5c52b0efcce4c50d Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Fri, 20 Jul 2001 11:50:35 +0000 Subject: [PATCH] Better copyonwrite error handling --- debian/patch.002_viced_debugging | 28 ++++++++++++++++++++++++++++ src/viced/afsfileprocs.c | 10 +++++----- 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 debian/patch.002_viced_debugging diff --git a/debian/patch.002_viced_debugging b/debian/patch.002_viced_debugging new file mode 100644 index 000000000..1a5dbba01 --- /dev/null +++ b/debian/patch.002_viced_debugging @@ -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); diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 1d98b46eb..7e96df340 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -28,7 +28,7 @@ #include #include -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 #include @@ -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); -- 2.39.5