[818] in testers
[Ezra Peisach: Proper/better (?) fix to VAX afs time skew]
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Mon May 21 09:23:29 1990
Date: Mon, 21 May 90 09:22:59 -0400
To: afsbugs+@TRANSARC.COM
Cc: epeisach@MIT.EDU, testers@MIT.EDU
From: Richard Basch <probe@MIT.EDU>
Enclosed is a patch for the setting of the flushDV value of the cache
structure. The way we discovered this was on a VAX BSD 4.3 system,
which doesn't use the hardware clock at all. What we were experiencing
was a rapid loss of clock interrupts, causing a rapid clock skew. [We
run afsd with the -nosettime argument, and use timed for clock
synchronization; the clock skew was on the order of 35 seconds per 3
minute interval if a "find" was running on AFS].
Anyway, the problem was tracked down to a change in the setting of the
flushDV value, and that the change was actually correct. In your RCS
revision 1.47, it used to be initialized to AFS_MAXDV, and is now
initialized to 0.
The original comment was that the original setting of flushDV need not
cause a flush, which is indeed true. Thus, the tests here set flushDV
to the current DV, if it had not yet been initialized.
I am still analyzing the following fix and am beginning to question
it... it works, but I am wondering if it is complete. Does the flushDV
value ever get set to the DataVersion number elsewhere? If it did,
well, we wouldn't have had a problem, but it doesn't. The question is
what happens when the DataVersion number is incremented and we already
have a non-zero value for flushDV?
-Richard
*** /tmp/,RCSt1000317 Sun May 20 22:05:42 1990
--- afs/afs_cache.c Sun May 20 21:46:08 1990
***************
*** 1459,1464 ****
--- 1459,1465 ----
avc->m.Date = astat->ClientModTime;
}
avc->m.DataVersion = astat->DataVersion;
+ if(avc->flushDV == 0) avc->flushDV = astat->DataVersion;
avc->m.Owner = astat->Owner;
avc->m.Mode = astat->UnixModeBits;
avc->m.Group = astat->Group;
===================================================================
RCS file: RCS/afs_vnodeops.c,v
retrieving revision 1.1
diff -c -r1.1 afs_vnodeops.c
*** /tmp/,RCSt1000317 Sun May 20 22:05:55 1990
--- afs_vnodeops.c Sun May 20 21:15:22 1990
***************
*** 1823,1828 ****
--- 1823,1829 ----
avers = astat->DataVersion;
/* this *is* the version number, no matter what */
avc->m.DataVersion = avers;
+ if(avc->flushDV == 0) avc->flushDV = avers;
avc->m.Length = astat->Length;
avc->m.Date = astat->ClientModTime;
adc->flags |= DFEntryMod;