On Tue, Dec 02, 2003 at 07:47:50PM +1100, Jim Thomas wrote: > Debian Woody with security updates > Linux kernel 2.2.25 > Samba 3.0.0 > libc6 2.2.5 > > The problem I have is with a windows application that uses samba. This > application is crucial for the organization, so if this is not fixed, > and soon, we will have to ditch Samba and move to a windows server. > I *really* don't want to do this, as Samba has been working so well for > years now and billg is rich enough already. > > I am having problems with a windows client program that does a range > lock on a file on a share. The log.smbd reports with debug level 3: > > [2003/12/02 17:20:23, 3] lib/util.c:fcntl_lock(1632) > fcntl_lock: fcntl lock gave errno 75 (Value too large for defined data type) > [2003/12/02 17:20:23, 3] lib/util.c:fcntl_lock(1651) > fcntl_lock: lock failed at offset 4294967284 count 1 op 13 type 1 (Value too large > for defined data type) > [2003/12/02 17:20:23, 3] smbd/error.c:error_packet(94) > error string = Value too large for defined data type > > What I think is happening is the client is passing a number > greater than 2^31 as the lock range, which will fail according to > http://samba.org/samba/docs/man/locking.html#id2918968 which states > that samba locks from 0-2^31, whereas windows issues lock requests up > to 2^32 or 2^64. > > Setting "locking = no" fixes the problem, but will cause others as these > files are used by many people at once.
If Samba is configured to use 64 bit filesystems it assumes it can lock from 0 to 2^63-1 - the code in locking/posix.c in posix_fcntl_lock() takes care of this. If it is configured to use 32 bit filesystems it assumes it can lock from 0 to 2^31-1. Samba will truncate the posix lock above these limits as no posix application will ever see such a lock. You might get this problem if you're running a 64-bit Samba gatewaying onto a 32-bit mounted NFS mount, or other mounted partition. Can you give more details about the setup please ? This code has been stable and working for quite a long time now. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba