Default VFS lock function broken?

Andreas Lund floyd at
Sat Mar 23 15:22:03 GMT 2002

First let me say this: I'm on very thin ice here, because I'm a C newbie and
this is one area I know very little about. That said, this is what I get when
a clients tries to open any file larger than a few bytes via my VFS module:

[2002/03/24 00:50:15, 3] lib/util.c:fcntl_lock(1350)
  fcntl_lock: fcntl lock gave errno 22 (Invalid argument)
[2002/03/24 00:50:15, 0] locking/posix.c:posix_fcntl_lock(659)
  posix_fcntl_lock: WARNING: lock request at offset 440631296, length 2820
[2002/03/24 00:50:15, 0] locking/posix.c:posix_fcntl_lock(661)
  an Invalid argument error. This can happen when using 64 bit lock offsets
[2002/03/24 00:50:15, 0] locking/posix.c:posix_fcntl_lock(662)
  on 32 bit NFS mounted file systems.
[2002/03/24 00:50:15, 0] smbd/fileio.c:seek_file(40)
  seek_file: sys_lseek failed. Error was Invalid argument
[2002/03/24 00:50:15, 3] smbd/fileio.c:read_file(97)
  read_file: Failed to seek to 440631296

When this happens, Samba appears to go into a spin trying over and over

I have hooked the following: "opendir", "readdir", "closedir", "stat" and
"open". All the others pass straight through, including "lock". Does anyone
know how to solve this problem please?

I mentioned earlier that I think the modules are compiled with an incorrect
"struct dirent", because I have to offset all the filenames by 8 bytes or the
first 8 chars are lost. My gut feeling is that the two problems are related,
but I have no idea where to start looking for the source :-/

Andreas Lund (floyd at
Tel: +47 / +47
Ano-Tech Computers (
** Never send a human to do a machine's job  **

More information about the samba-technical mailing list