[OpenAFS-win32-devel] problem with file open for read-only
Rodney M Dyer
rmdyer@uncc.edu
Wed, 14 Feb 2007 12:02:54 -0500
At 09:13 AM 2/14/2007, Jeffrey Altman wrote:
>Tomcs=E1nyi Roland wrote:
> > Hello,
> >
> >> AFS does not support byte range locks but Windows requires them.
> >> Therefore, when a file is opened for writing, the cache manager on
> >> that machine obtains a full file write lock. All other cache managers
> >> are then prevented from reading the file until the file has been=
closed.
> >>
> >> When Office opens a file for read-only, it obtains a lock when the
> >> file is read and then it releases the lock. This allows another cache
> >> manager to obtain the lock.
> >
> > This means my problem not an program error, so it not will be change in
> > future versions?
> >
> > Other words, if we need to open doc/xls for read-only while other user
> > opened it for read-write then we have to find some other solutions??
> >
> > Best regards: Roland
>
>This problem will exist until such time as the AFS file servers are
>modified to support byte range locks. I can not say when this change
>will occur but it will not be within the next year. It is highly
>dependent upon the availability of developer resources.
>
>Jeffrey Altman
As far as I'm concerned, this is a "good" thing, because it prevents people=
=20
from corrupting documents. However it does seem disconcerting that the=20
servers don't understand "whole lock read" vs. "whole lock write". As the=
=20
original poster seems to suggest, any files opened by one client will be=20
"held hostage" until they are "released". The original client should have=
=20
been able to obtain a "whole file read/write lock", while all the other=20
clients are just allowed to read the file (read-only).
Maybe I don't understand the problem, but don't office apps fall back to=20
"read-only" when another client owns a "whole file write lock"? Also, on=20
Windows CIFS servers there are methods to release (bad) clients in case the=
=20
locks get "hung". We have no such methods under AFS right? So we just=20
have to wait until the lock times out?
Rodney=20