summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-09-05 00:05:07 +0000
committerJeremy Allison <jra@samba.org>2001-09-05 00:05:07 +0000
commitd3518f1d8a63cab323a9c5c94d5eb552302b4df6 (patch)
treed13d5f14506c4201c4f8b1887e569764c5abb49e /source3/locking
parent1f5203cd24b869bd4270c8d020909a448f5d378f (diff)
downloadsamba-d3518f1d8a63cab323a9c5c94d5eb552302b4df6.tar.gz
samba-d3518f1d8a63cab323a9c5c94d5eb552302b4df6.tar.bz2
samba-d3518f1d8a63cab323a9c5c94d5eb552302b4df6.zip
NFS v2 can return ENOLCK when greater than 31 bit offsets are used.
Treat this the same as an EFBIG error. Jeremy (This used to be commit 8fad5177701c1738a7f5bdd7c0082ef23a00b876)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 6a621200ca..b2ffbeda8f 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -705,10 +705,10 @@ static BOOL posix_fcntl_lock(files_struct *fsp, int op, SMB_OFF_T offset, SMB_OF
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 */