[Samba] oplocks issue when trying to copy file

Philip Ong phong at nvidia.com
Mon Oct 24 23:22:29 MDT 2011


I don't have a linux vendor. We compile kernel.org kernel on top of Centos 5.x. kernel.org is still under construction so I'm not able to submit a bug. Any other suggestions?

-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org] 
Sent: Monday, October 24, 2011 5:36 PM
To: Jeremy Allison
Cc: Philip Ong; 'samba at lists.samba.org'
Subject: Re: [Samba] oplocks issue when trying to copy file

On Mon, Oct 24, 2011 at 05:35:01PM -0700, Jeremy Allison wrote:
> On Wed, Oct 19, 2011 at 11:33:32PM -0700, Philip Ong wrote:
> > I've narrowed this problem down to a patch that is applied in 2.6.36.3. I replaced file.c from 2.6.36.2 into 2.6.36.3 and Samba works fine. The problem is I'm not sure if Samba needs to be fixed or the kernel needs to be. Anyone know what the right action is? One thing I noticed was the invalid argument being sent in the debugging log.
> > 
> > "  linux_set_kernel_oplock: Refused oplock on file home/foo/open/test.cfg, fd = 33, file_id = 17:aa41ab:0. (Invalid argument)"
> > 
> > Any advice would help.
> > 
> > Thanks,
> > Phil
> > 
> > 
> > The commit 129a84de2347002f09721cda3155ccfd19fade40 (locks: fix F_GETLK
> > regression (failure to find conflicts)) fixed the posix_test_lock()
> > function by itself, however, its usage in NFS changed by the commit
> > 9d6a8c5c213e34c475e72b245a8eb709258e968c (locks: give posix_test_lock
> > same interface as ->lock) remained broken - subsequent NFS-specific
> > locking code received F_UNLCK instead of the user-specified lock type.
> > To fix the problem, fl->fl_type needs to be saved before the
> > posix_test_lock() call and restored if no local conflicts were reported.
> 
> Looking closer at the problem...
> 
> We simply call fcntl(fd, F_SETLEASE, leasetype) on a fd to
> get a kernel oplock on it.
> 
> int leasetype can be F_WRLCK or F_UNLCK (from Samba). This
> matches the fcntl F_SETLEASE documentation completely. There
> has been no change whatsoever in Samba in this regard.
> 
> So I'm definitely calling kernel regression bug on this one.

FYI. Can you help me by logging a bug with your Linux
vendor on this one so we can get this fixed please ?

Jeremy.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the samba mailing list