[OpenAFS] flock() behavior openafs-1.2.11

David Thompson thomas@cs.wisc.edu
Fri, 29 Oct 2004 16:34:25 -0500


I'm wondering if anyone can shed any light on a difference in flock() behavior 
that we're seeing between a couple of systems.  The first box is a Red Hat 9 
computer (kernel 2.4.20-30.9smp).  The second one runs Tao linux (a RHEL 
rebuild; kernel 2.4.21-15.0.4.TL).  Both are running openafs 1.2.11.  The 
syscall trace from the rh9 box gives:

open("/s/db-apps/lib/GradApp/lib/GradApp.pbk", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE, 0xbfffecb0) = -1 EINVAL (Invalid argument)
_llseek(4, 0, [0], SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=9192, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
flock(4, LOCK_SH)                       = 0

But the corresponding trace from the Tao box gives:

open("/s/db-apps/lib/GradApp/lib/GradApp.pbk", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfffae08) = -1 EINVAL (Invalid 
argumen
t)
_llseek(4, 0, [0], SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=9192, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
flock(4, LOCK_SH)                       = -1 EACCES (Permission denied)

The ACLs on the directory give this user read acess but no write. 
 Like I said, the openafs code is the same on both boxes.

Has anyone seen anything like this?  Is this a kernel change?

Thanks much.

--
Dave Thompson  ( thomas AT cs DOT wisc DOT edu )

Associate Researcher                    Department of Computer Science
University of Wisconsin-Madison         http://www.cs.wisc.edu/ TILDE thomas
1210 West Dayton Street
Madison, WI 53706-1685
--