From: Derrick Brashear Date: Wed, 26 Sep 2001 16:28:22 +0000 (+0000) Subject: bos-avoid-false-errors-when-salvaging-20010926 X-Git-Tag: openafs-devel-1_3_0~278 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=98c1c1df9e952bcf8482b84e656ef5a6d8d31fd8;p=packages%2Fo%2Fopenafs.git bos-avoid-false-errors-when-salvaging-20010926 there were some cases where we falsely reported the BZNOENT from salvage-tmp being cleanup up as "bos: failed to start 'salvager' (no such entity)".. despite having just reported: bos: salvage completed this should no longer happen. --- diff --git a/src/bozo/bos.c b/src/bozo/bos.c index 12b30692f..d6cc0f50c 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -1259,7 +1259,10 @@ char *orphans; parms[1] = "now"; /* when to do it */ code = BOZO_CreateBnode(aconn, "cron", "salvage-tmp", parms[0], parms[1], parms[2], parms[3], parms[4], notifier); - if (code) goto done; + if (code) { + printf("bos: failed to start 'salvager' (%s)\n", em(code)); + goto done; + } /* now wait for bnode to disappear */ while (1) { IOMGR_Sleep(5); @@ -1485,7 +1488,6 @@ struct cmd_syndesc *as; { /* now do the salvage operation */ printf("Starting salvage.\n"); rc = DoSalvage(tconn, (char *) 0, (char *) 0, outName, showlog,parallel,tmpDir,orphans); - if (rc) printf("bos: failed to start 'salvager' (%s)\n", em(rc)); if (curGoal == BSTAT_NORMAL) { printf("bos: restarting fs.\n"); code = BOZO_SetTStatus(tconn, "fs", BSTAT_NORMAL); @@ -1526,7 +1528,6 @@ struct cmd_syndesc *as; { printf("Starting salvage.\n"); rc = DoSalvage(tconn, as->parms[1].items->data, (char *) 0, outName, showlog,parallel,tmpDir,orphans); - if (rc) printf("bos: failed to start 'salvager' (%s)\n", em(rc)); if (curGoal == BSTAT_NORMAL) { printf("bos: restarting fs.\n"); code = BOZO_SetTStatus(tconn, "fs", BSTAT_NORMAL); @@ -1578,10 +1579,8 @@ struct cmd_syndesc *as; { printf("Starting salvage.\n"); rc = DoSalvage(tconn, as->parms[1].items->data, tname, outName, showlog,parallel,tmpDir,orphans); - if (rc) { - printf("bos: failed to start 'salvager' (%s)\n", em(rc)); + if (rc) return rc; - } } return 0; }