[OpenAFS] Disconnected OpenAFS
Tue, 25 Sep 2007 00:57:31 -0400
Jim Rees wrote:
> Jeffrey Altman wrote:
> You do not need to have all of the callbacks at once. You can perform
> your check and mark files/directories disconnected a bit at a time.
> I don't understand that. If you don't snapshot the state of your file
> system at one particular instant, won't you have an inconsistent view of the
> file system? What do you mean by "mark files/directories disconnected?"
For each vnode in the cache, you keep track of the
connected/disconnected state. While you are in the transition from
connected -> disconnected you sync files into the cache and mark them
disconnected. When a request comes in for a file marked disconnected,
you treat it as if disconnected mode was active.
For disconnected -> connected transitions you do the same in reverse.
You sync the files back to the file server and then remove the
disconnected flag. Files/directories that are in a conflict state
remain disconnected until the end user deals with the conflict and
decides what should be done.
We can't give a user a perfectly consistent view of the entire afs file
system space. What we can do is provide a mostly consistent view of the
portions of the file system space that the user cares about. Note that
a user can only care about as many files as fit in the cache.