On Thursday, February 08, 2007 05:54:55 PM -0500 Marcus Watts
<[EMAIL PROTECTED]> wrote:
phase 2 "soon". Fileserver only does whole-file locking.
All clients support "generic" local byte-range locking,
backed up by serverside whole-file locking and
some sort of simplistic file flushing when a write
lock is released.
I think this is rather harder than you or Matt suspect. The problem with
backing local byte-range locks by whole-file locks on the server is that to
do it safely, the lock you get on the server has to be at least as good as
the local lock, and there's no way to atomically upgrade and downgrade
locks on the server. That effectively means that all locks need to be
backed by exclusive locks on the server, since you can have this scenario:
- process A gets whole-file read lock
- process B gets partial-file read lock
- process A releases its lock
- process C gets partial-file write lock, not conflicting with B's.
When process C gets its lock, you need to upgrade to a write lock, but you
cannot do so without first giving up process B's lock.
-- Jeff
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel