]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser: Do not reset copyDate in ReClone
authorAndrew Deason <adeason@sinenomine.net>
Thu, 3 Feb 2011 22:11:38 +0000 (16:11 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 29 Aug 2013 12:01:36 +0000 (05:01 -0700)
When we ReClone in the volserver, do not reset the clone's copyDate to
the current time. If we retain the copyDate between ReClone
operations, then we can know when the clone was first created (and
thus makes local RO clones more consistent with remote RO sites).

Reviewed-on: http://gerrit.openafs.org/3892
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 112b9b35fc701ca26ba7f99c31a73a7a1eecbdc0)

Change-Id: Ifd84a161125bd14799fab2f75f321ca164ef39d2
Reviewed-on: http://gerrit.openafs.org/9451
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/volser/volprocs.c

index 16865b50c606170b397a914c7e2f9e0a58eec97a..61564587c210c77d14b2d0279190f85f4abf79ee 100644 (file)
@@ -985,15 +985,16 @@ VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId)
     }
     /* don't do strcpy onto diskstuff.name, it's still OK from 1st clone */
 
-    /* pretend recloned volume is a totally new instance */
-    V_copyDate(clonevp) = time(0);
-    V_creationDate(clonevp) = V_copyDate(clonevp);
+    /* update the creationDate, since this represents the last cloning date
+     * for ROs. But do not update copyDate; let it stay so we can identify
+     * when the clone was first created. */
+    V_creationDate(clonevp) = time(0);
     ClearVolumeStats(&V_disk(clonevp));
     V_destroyMe(clonevp) = 0;
     V_inService(clonevp) = 0;
     if (newType == backupVolume) {
-       V_backupDate(originalvp) = V_copyDate(clonevp);
-       V_backupDate(clonevp) = V_copyDate(clonevp);
+       V_backupDate(originalvp) = V_creationDate(clonevp);
+       V_backupDate(clonevp) = V_creationDate(clonevp);
     }
     V_inUse(clonevp) = 0;
     VUpdateVolume(&error, clonevp);