From: Andrew Deason Date: Thu, 5 Apr 2012 22:55:17 +0000 (-0500) Subject: viced: Do not offline volume on successful IH_DEC X-Git-Tag: upstream/1.6.2_pre2^2~189 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a8eb0bfd04c4bc60cc37528b15f5a1e4cbe39b36;p=packages%2Fo%2Fopenafs.git viced: Do not offline volume on successful IH_DEC If we fail to CoW a file due to ENOSPC, we try to IH_DEC the new file copy, and if IH_DEC fails, we take the volume offline for salvaging. But IH_DEC returns 0 on success, not on error. So take the salvaging path when we get non-zero. Reviewed-on: http://gerrit.openafs.org/7054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 613f14727fbb404fb7fc1cac953dda46b671222e) Change-Id: I207ffc4db59bdbd8b80fa4ffad9210d13d76b68f Reviewed-on: http://gerrit.openafs.org/7394 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 23149763e..e09a96820 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -1347,7 +1347,7 @@ CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len) IH_RELEASE(newH); FDH_REALLYCLOSE(targFdP); rc = IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr)); - if (!rc) { + if (rc) { 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));