[OpenAFS-devel] linux-and-locks-cleanup-20070202 crashes linux kernels older than 2.6.17 (see RT #53457)

Matt Benjamin matt@linuxbox.com
Thu, 08 Feb 2007 15:40:25 -0500


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


That was the idea behind using posix_lock_file, and I sent a patch to do
that, too.  Chaskiel's enroll patch is effectively the same, pre cleanup
(but cleaner).  I didn't foresee the issues that arose, either.  I did
test a few 2.4.x kernels, and 2.6.9, with overlapping and non
overlapping ranges, local and remote locks in AFS.  Things got more
complicated on the Linux side, I guess.

For future, we want unified behavior across platforms.  Then, there is
server side byte-range locking...

Matt

Christopher Allen Wing wrote:
> Marcus:
> 
> 
> On Thu, 8 Feb 2007, Marcus Watts wrote:
> 

> 
> I think the current semantics (as of 1.4.2+) are a mishmash of
> traditional AFS locking plus partial local locking in some cases.  It's
> not consistent.
> 
>> I believe Matt is planning to produce a much more extensive
>> "portable" version of locking that should work much like the
>> current linux code is supposed to work (ie, local byte range locks
>> layered on top of fileserver whole file locks) that should work for
>> most unix(-like) platforms.
> 
> I think it would be possible to do something like this on linux by
> primarily using the local linux locking code, and having a helper
> function that attempts to change the lock state on the AFS server to:
> 
>     single read lock
>     single write lock
>     no lock
> 
> upon request.  But it seems there aren't reliable means to do this.
> There is no race-free way to transition between a read lock and write
> lock and vice versa.  If there is an extended network failure any lock
> on the server will time out and then, potentially, local locks might
> remain in place- do we then have to call back into the kernel and kill
> all the local locks?
> 
> 
> I don't know what type of kernel APIs are available on other types of
> unix.  It would be nice if we didn't have to rewrite an entire posix
> file locking layer in openafs, but rather, re-use kernel APIs where
> possible.
> 
> 
> -Chris
> wingc@engin.umich.edu
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel




- --

Matt Benjamin

The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFy4q5JiSUUSaRdSURCNoMAJ9/L9UvKHH3kyvPCfwcUFI5vsFllwCfWF2Z
MZoVF21urXEH97xgXHa3qKw=
=5UVk
-----END PGP SIGNATURE-----