Locking issues with HP-UX 11.00
reinout.wijnveen at philips.com
reinout.wijnveen at philips.com
Fri Sep 14 03:06:02 GMT 2001
Jeremy,
I grabbed the latest CVS version yesterday and it seems to work fine: i'm sending this mail with my homedir connected from the testserver. I'll continue testing.
Thanks so far.
Is there anything more i need to do or check?
-
Regards,
Reinout Wijnveen
"All those who believe in psychokinesis raise my hand"
ICT-N/Philips Semiconductors Nijmegen
Address: AC 0.062, Gerstweg 2, 6534 AE Nijmegen, Fax: +31 24 353 2019
Jeremy Allison <jeremy at valinux.com>@valinux.com on 09/05/2001 02:07:10 AM
Sent by: jeremy at valinux.com
To: "MCCALL,DON (HP-USA,ex1)" <don_mccall at hp.com>
cc: Reinout Wijnveen/NYM/SC/PHILIPS at EMEA2
reinout.wijnveen at wanadoo.nl
samba at lists.samba.org
Subject: Re: Locking issues with HP-UX 11.00
Classification:
"MCCALL,DON (HP-USA,ex1)" wrote:
>
> Hi Jeremy,
> More info:
> With the following program, I DO get an EFBIG error back.
> If I change the lock.l_start to a number greater than 2gbyte -1, then no
> matter what the offset i choose, I get a ENOLCK instead.
> The lseek ALWAYS gives back the EFBIG.
>
> So what appears to be happening is that there is a 'hierarchy' - if the lock
> start (offset) exceeds NFSv2 file limits, then you get ENOLCK, before the
> count is checked. If the lock start falls within NFSv2 file limits, you get
> a EFBIG only if the count is 65535 or greater...
Actually, I finally got time to look at this and it looks
like ENOLCK is a valid error that NFS v2 implementations
can return when the offset is larger that 31 bits.
So I've added the following patch to CVS - it's cleaner
than the original as it doesn't depend upon #ifdefs and
it should have the same effect.
Can you check out the 2.2 CVS and check if this works for
you ?
Thanks,
Jeremy.
Index: locking/posix.c
===================================================================
RCS file: /data/cvs/samba/source/locking/posix.c,v
retrieving revision 1.19.4.9
diff -u -r1.19.4.9 posix.c
--- locking/posix.c 26 Aug 2001 19:39:29 -0000 1.19.4.9
+++ locking/posix.c 5 Sep 2001 00:01:30 -0000
@@ -705,10 +705,10 @@
ret = conn->vfs_ops.lock(fsp,fsp->fd,op,offset,count,type);
- if (!ret && (errno == EFBIG)) {
+ if (!ret && ((errno == EFBIG) || (errno == ENOLCK))) {
if( DEBUGLVL( 0 )) {
dbgtext("posix_fcntl_lock: WARNING: lock request at offset %.0f, length %.0f returned\n", (double)offset,(double)count);
- dbgtext("a 'file too large' error. This can happen when using 64 bit lock offsets\n");
+ dbgtext("an %s error. This can happen when using 64 bit lock offsets\n", strerror(errno));
dbgtext("on 32 bit NFS mounted file systems. Retrying with 32 bit truncated length.\n");
}
/* 32 bit NFS file system, retry with smaller offset */
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba
mailing list