[OpenAFS] AFS Locking

Chaskiel M Grundman cg2v@andrew.cmu.edu
Thu, 18 May 2006 13:14:31 -0400


--==========C90464DE4EF2AF1ADD45==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I suggest switching to fcntl() style locking, which will work if l_whence=20
is SEEK_SET, and l_start and l_len are both 0.

I'm actually surprised that flock locking works on 2.4. My reading of=20
2.4.19 and 2.4.32 suggests that flock() only works locally on 2.4 (i.e., it =

does not allow a network filesystem to send lock requests to the server) It =

is possible your vendor kernel or libc converts flock locks to fcntl locks.

Linux 2.6 does allow network filesystems to intercept flock requests, but=20
afs does not yet do this.
--==========C90464DE4EF2AF1ADD45==========
Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: base64

MIIL1wYJKoZIhvcNAQcCoIILyDCCC8QCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3
DQEHAaCCCVswggLjMIICTKADAgECAgMO/8kwDQYJKoZIhvcNAQEEBQAwYjELMAkG
A1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4x
LDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4X
DTA1MDYyMzE3MzEzMFoXDTA2MDYyMzE3MzEzMFowRTEfMB0GA1UEAxMWVGhhd3Rl
IEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTY2cydkBhbmRyZXcuY211
LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALujtch96NHbplBs
5DnSTn03EsnbYsLng/wM+wbfyS6ml6CCGYl7HY+sIBm4DNygpyQz0mvtvy9kKz7V
M2GTYdH5QLOgxxPxzV3fItv4jF9LKr9tIiT+v9K7XQ2Xl4kDyJi1g19UsKU4wf+s
uFdennXZ0pkWTpUld9JRZiLSYQDs/Hi62OekBfIX+H96AskyMBhZj5OVA+CYtnCj
fz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