From fabec30f1783167b41e125f2755959e75f986e66 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Fri, 20 Jul 2001 21:38:06 +0000 Subject: [PATCH] viced-copyonwrite-give-useful-error-messages-when-taking-volumes-offline-20010720 don't just report "needs salvage", tell why it was taken offline --- src/viced/afsfileprocs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index c34272513..5a1cef19c 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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); -- 2.39.5