From: Andrew Deason Date: Thu, 3 Feb 2011 22:11:38 +0000 (-0600) Subject: volser: Do not reset copyDate in ReClone X-Git-Tag: upstream/1.6.6_pre2^2~114 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b2401a892177a56a519011ced023616080042156;p=packages%2Fo%2Fopenafs.git volser: Do not reset copyDate in ReClone 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 Tested-by: BuildBot (cherry picked from commit 112b9b35fc701ca26ba7f99c31a73a7a1eecbdc0) Change-Id: Ifd84a161125bd14799fab2f75f321ca164ef39d2 Reviewed-on: http://gerrit.openafs.org/9451 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot --- diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 16865b50c..61564587c 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -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);