"chas williams - CONTRACTOR" <[EMAIL PROTECTED]> writes:
> In message <[EMAIL PROTECTED]>,Adam Megacz writes:
>>If so, perhaps I can check what OS is running, use some hardwired
>>syscall value if OS==Linux, and use the fork()-and-fcntl(F_SETLK) to
>>look for (local) enforcement of byte-range locks if OS!=Linux.

> why the special tests for linux?

Because the test doesn't work on Linux.  Asking for a byte range lock
on a 1.4.x Linux client results in the whole file being locked at the
server and correct byte-range semantics between processes *on the same
machine*.

This is extra painful because (unlike the "liar locks" on other
clients) there doesn't appear to be any way to test for this behavior
without using AFS-specific APIs.  On the upside, the consequences of a
false positive under linux-openafs semantics are simply
deadlock/starvation rather than data corruption.

To avoid deadlock/starvation I need a way to detect that byte-range
locks are being upgraded and put the user program into a
(much less efficient) mode that uses only whole-file locks.

  - a

-- 
PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380

_______________________________________________
OpenAFS-info mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-info

Reply via email to