volser-dumpstuff-20061218
authorHartmut Reuter <reuter@rzg.mpg.de>
Tue, 19 Dec 2006 04:50:16 +0000 (04:50 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 19 Dec 2006 04:50:16 +0000 (04:50 +0000)
FIXES 46937

"vos release" per default does an incremental dump.
volser-dump-validate-input-20060417 ends up with keeping dead vnodes and
data in the remote RO-volume.  This patch corrects the behavior for
RO-volumes.

See ticket for extensive discussion.

src/volser/dumpstuff.c

index 59865ee..825852a 100644 (file)
@@ -1034,12 +1034,15 @@ RestoreVolume(register struct rx_call *call, Volume * avp, int incremental,
     struct iod iod;
     register struct iod *iodp = &iod;
     afs_int32 *b1 = NULL, *b2 = NULL;
-    int s1 = 0, s2 = 0, delo = incremental, tdelo;
+    int s1 = 0, s2 = 0, delo = 0, tdelo;
     int tag;
 
     iod_Init(iodp, call);
 
     vp = avp;
+    if (V_parentId(vp) == V_id(vp))
+      delo = incremental;
+
     if (!ReadDumpHeader(iodp, &header)) {
        Log("1 Volser: RestoreVolume: Error reading header file for dump; aborted\n");
        return VOLSERREAD_DUMPERROR;