Windows: Update root.afs scache dv when Freelance dir bufs are regenerated
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 31 Jul 2010 04:05:24 +0000 (00:05 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 2 Aug 2010 16:26:46 +0000 (09:26 -0700)
commit78f99d4a025d3b369d3ad4939098ea868feb6cfc
treefd02c60ab5acd8d51e070dbf043c5e607fb02966
parent9ec343cf4292e178fa1e4a9757232dc983ea9ba3
Windows: Update root.afs scache dv when Freelance dir bufs are regenerated

When the contents of the Freelance root directory changes the fake
directory buffers are updated and a fakeDirVersion is incremented.
The dataVersion of the cm_scache_t object is supposed to be updated
on the next access by performing a fake get callback request.
Unfortunately, this did not always occur because of a race.  If another
Freelance object is updated first, the root directory object would
never successfully get a fake callback.

This patchset ensures that the generation of the fake directory
buffer content and the callback are obtained under the same set
of locks thereby removing the race.

LICENSE MIT

Change-Id: Ic8c77fc3c652cd056f84db55ca6db32499bcb0c9
Reviewed-on: http://gerrit.openafs.org/2490
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_freelance.c