oplock (setlease) failures on 2.6 linux kernel

Steven French sfrench at us.ibm.com
Tue Feb 24 08:17:29 GMT 2004






FYI - In tracing today at Connectathon with Samba on Linux 2.6 we noticed
that at least for some local filesystems (jfs in particular) on 2.6 linux
kernel the internal variable i_count (a usage counter incremented by
__iget, and decremented via iput) was incorrectly set to two (instead of
one) when we dumped its value in various handle based operations on new
files (once the file was closed and reopened it was fine and the inode
i_count was one as expected).   This can severely impact performance by
causing oplock to be disabled,   due to not being able to grant leases on
new files (it works though for reopens of existing files) which in effect
turns off Samba distributed caching in some cases.    We did not try enough
local filesystems to say with certainty conclusions about local filesystems
other than ext3 which worked and jfs which failed but the few remote
filesystems we tried (cifs, smbfs) both had the correct value after both
opencreate and open (of existing file) cases.   My first reaction was that
this was likely a sideffect of the lookup intent changes that are unique to
2.6 (since they changed the opencreate vs. open paths) but after adding
some additional tracing I am not as convinced that the bug lies there,
especially after seeing one local filesystem (ext2) work.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com


More information about the samba-technical mailing list