/* The bulk status code used the length as a sequence number. */
/* Don't update the vcache entry unless the stats are current. */
if (avc->f.states & CStatd) {
- hset(avc->f.m.DataVersion, avers);
+ afs_SetDataVersion(avc, &avers);
#ifdef AFS_64BIT_CLIENT
FillInt64(avc->f.m.Length, astat->Length_hi, astat->Length);
#else /* AFS_64BIT_CLIENT */
struct VenusFid *afid, struct vattr *attrs,
struct vrequest *areq, int file_type)
{
+ afs_hyper_t zero;
memcpy(&avc->f.fid, afid, sizeof(struct VenusFid));
avc->f.m.Mode = attrs->va_mode;
/* Used to do this:
*/
avc->f.m.Group = adp->f.m.Group;
avc->f.m.Owner = adp->f.m.Owner;
- hset64(avc->f.m.DataVersion, 0, 0);
+ hzero(zero);
+ afs_SetDataVersion(avc, &zero);
avc->f.m.Length = attrs->va_size;
avc->f.m.Date = osi_Time();
switch(file_type) {
extern void afs_StaleVCacheFlags(struct vcache *avc, afs_stalevc_flags_t flags,
afs_uint32 cflags);
+extern void afs_SetDataVersion(struct vcache *avc, afs_hyper_t *avers);
+
extern void afs_ProcessFS(struct vcache *avc,
struct AFSFetchStatus *astat,
struct vrequest *areq);
struct server *serverp) {
afs_uint32 slot;
+ afs_hyper_t zero;
slot = avc->diskSlot;
osi_PrePopulateVCache(avc);
hzero(avc->mapDV);
avc->f.truncPos = AFS_NOTRUNC; /* don't truncate until we need to */
- hzero(avc->f.m.DataVersion); /* in case we copy it into flushDV */
+ hzero(zero);
+ afs_SetDataVersion(avc, &zero); /* in case we copy it into flushDV */
avc->Access = NULL;
avc->callback = serverp; /* to minimize chance that clear
* request is lost */
struct AFSFetchStatus *astat, struct vrequest *areq)
{
afs_size_t length;
+ afs_hyper_t newDV;
AFS_STATCNT(afs_ProcessFS);
#ifdef AFS_64BIT_CLIENT
avc->f.m.Length = length;
avc->f.m.Date = astat->ClientModTime;
}
- hset64(avc->f.m.DataVersion, astat->dataVersionHigh, astat->DataVersion);
+ hset64(newDV, astat->dataVersionHigh, astat->DataVersion);
+ afs_SetDataVersion(avc, &newDV);
avc->f.m.Owner = astat->Owner;
avc->f.m.Mode = astat->UnixModeBits;
avc->f.m.Group = astat->Group;
}
}
}
+
+void
+afs_SetDataVersion(struct vcache *avc, afs_hyper_t *avers)
+{
+ hset(avc->f.m.DataVersion, *avers);
+}