[811] in testers

home help back first fref pref prev next nref lref last post

Proper/better (?) fix to VAX afs time skew

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sun May 20 22:23:53 1990

From: epeisach@ATHENA.MIT.EDU
Date: Sun, 20 May 90 22:23:22 -0400
To: probe@ATHENA.MIT.EDU
Cc: testers@ATHENA.MIT.EDU, bug-afs@ATHENA.MIT.EDU


The following fix works. I believe this is better than Richard's
version. Essentially, if you have a data version number of a file, and
you have never flushed the entry, then set the flushed version number to
the data version number. There may be some ramifications of this as the
code may somewhere be depending on the data to be flushed at least once
(which seems stupid to me) and this fix is then no worse off than
Richard's as the flushing will not take place in his.

I am not positive the afs_vnodeops change is required, but by itself it
does not fix the problem. (I first put in the vbodeops fix and then the
cache one). Btw: These are the only places that Dataversion is set.
Some commenting explaining what is being done, should probably be added.

In reards to my prior message, the flush routine which Richard had his
mod is called every thirty seconds to flush entries to the server.
(afs_daemon.c). 

There is one concern I have with my change: When writing to a file, the
Dataversion must change so that flushing it will do something. I have
not verified that the code is proper in that area, but I do appear to be
soring files, so I assume it works. (Not really the right assumption so
it needs to be checked). There is another versionnumber that deals with
mod's, so this fix should be examined with this other aspect in
light....

	Ezra


RCS file: RCS/afs_cache.c,v
retrieving revision 1.1
diff -c -r1.1 afs_cache.c
*** /tmp/,RCSt1000317	Sun May 20 22:05:42 1990
--- 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;

home help back first fref pref prev next nref lref last post