[CSL #248914] [OpenAFS] flock() behavior openafs-1.2.11

Derrick J Brashear shadow@dementia.org
Wed, 1 Dec 2004 14:28:30 -0500 (EST)


Ew, a widereply.

>> Perchance does one support 64 bit locks (F_GETLK64) and the other doesn't?
>

> Box 2 (flock doesn't work per the man page):
>
> 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)

[]


>        if (filp->f_op && filp->f_op->lock) {
> repeat:
>                error = flock_fs_file(filp, type, cmd);

fine, so i'll guess this function calls one of our ops (getattr?) and 
somehow loses, because EACCES shouldn't be coming from afs_lockctl (at 
least not directly)

Can you fstrace both cases?