git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5e7e372
)
vos: Do not try to remove backup volume id 0
author
Andrew Deason
<adeason@sinenomine.net>
Mon, 9 Apr 2012 22:16:42 +0000 (17:16 -0500)
committer
Derrick Brashear
<shadow@dementix.org>
Tue, 10 Apr 2012 11:25:25 +0000 (
04:25
-0700)
Currently we always try to delete a BK volume if we're deleting the
RW. If the BK volume id is 0, this is never going to do anything, so
don't try to delete it.
Change-Id: I0c003040cface9999944d61637077fce1736445e
Reviewed-on: http://gerrit.openafs.org/7140
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/volser/vsprocs.c
patch
|
blob
|
history
diff --git
a/src/volser/vsprocs.c
b/src/volser/vsprocs.c
index
8bb600e
..
801489c
100644
(file)
--- a/
src/volser/vsprocs.c
+++ b/
src/volser/vsprocs.c
@@
-995,12
+995,14
@@
UV_DeleteVolume(afs_uint32 aserver, afs_int32 apart, afs_uint32 avolid)
ERROR_EXIT(0);
}
- /* Delete backup if it exists */
- code = DoVolDelete(aconn, entry.volumeId[BACKVOL], apart,
- "the backup", 0, NULL, NULL);
- if (code && code != VNOVOL) {
- error = code;
- goto error_exit;
+ if (entry.volumeId[BACKVOL]) {
+ /* Delete backup if it exists */
+ code = DoVolDelete(aconn, entry.volumeId[BACKVOL], apart,
+ "the backup", 0, NULL, NULL);
+ if (code && code != VNOVOL) {
+ error = code;
+ goto error_exit;
+ }
}
if (verbose)