From 112b9b35fc701ca26ba7f99c31a73a7a1eecbdc0 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 3 Feb 2011 16:11:38 -0600 Subject: [PATCH] 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). Change-Id: Ic76862c1a03ee3cafaf199f414fabc90e3b058d2 Reviewed-on: http://gerrit.openafs.org/3892 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/volser/volprocs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 05c7006..a906b5f 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -970,15 +970,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); -- 1.9.4