Re: problem with file open for read-only
Rodney M Dyer <[email protected]> Wed, 14 Feb 2007 12:02:54 -0500
| Newsgroups | gmane.comp.file-systems.openafs.devel.win32 |
|---|---|
| Message-ID | <[email protected]> |
At 09:13 AM 2/14/2007, Jeffrey Altman wrote: >Tomcsányi 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 from corrupting documents. However it does seem disconcerting that the servers don't understand "whole lock read" vs. "whole lock write". As the original poster seems to suggest, any files opened by one client will be "held hostage" until they are "released". The original client should have been able to obtain a "whole file read/write lock", while all the other 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 "read-only" when another client owns a "whole file write lock"? Also, on Windows CIFS servers there are methods to release (bad) clients in case the locks get "hung". We have no such methods under AFS right? So we just have to wait until the lock times out? Rodney