From: Mark Vitale Date: Thu, 7 Mar 2013 14:34:55 +0000 (-0500) Subject: vos: noise messages when attempting to delete non-existent volume X-Git-Tag: upstream/1.6.3^2~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ddaef4378de7af439de1d574155506f659ca8c56;p=packages%2Fo%2Fopenafs.git vos: noise messages when attempting to delete non-existent volume With vos refactor commit f4e73067cdef990262c69c38ac98761620a63f25, some formerly conditional volume deletes are now unconditional. This regresses 'vos move' output with harmless "error" messages when AFSVolTransCreate() returns VNOVOL: "Failed to start transaction on " "Volume not attached, does not exist, or not online" Modify DoVolDelete() to return early (and silently) with VNOVOL in this case, allowing the caller to handle this appropriately. Reviewed-on: http://gerrit.openafs.org/9596 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 1092cbe34fc8519826b3fa0565505b7bd81bc922) Change-Id: I77e701378a999c8ad9413bfefcace0ee06aecb07 Reviewed-on: http://gerrit.openafs.org/9597 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 9a949fcd8..28436157a 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -1191,6 +1191,12 @@ DoVolDelete(struct rx_connection *aconn, afs_uint32 avolid, code = AFSVolTransCreate_retry(aconn, avolid, apart, ITOffline, &ttid); + /* return early and quietly for VNOVOL; don't continue the attempt to delete. */ + if (code == VNOVOL) { + error = code; + goto dfail; + } + EGOTO2(dfail, code, "%sFailed to start transaction on %u\n", prefix, avolid);