[linux-cifs-client] RE: Questions about smbfs

Steven French sfrench at us.ibm.com
Tue Jul 20 03:36:40 GMT 2004


> 1)     Does fcntl work from either cifs client or smbfs.

fcntl is not hookable until about 2.6.6 kernel, but lock calls are passed 
to a filesystem if it hooks vfs file method ".lock"
cifs handles it (byte range lock) but smbfs does not.  cifs passes most 
but not all posix byte range lock tests (it may be possible to do to 
Windows or Samba but has not been proven yet whether or not it is possible 
to emulate near perfectly with cifs)
the code in current 2.6 to hook fcntl in cifs is ifdef out (to enable 
#define CONFIG_CIFS_FCNTL) but there is no need to hook fcntl (since lock 
is handled differently without having to hook it) unless you want to hook 
DNOTIFY, SETLEASE or GETLEASE on the client (which would be interesting to 
do and I am part way through coding)

> 2)     Does libsmbclient have a fcntl. This way in application code any 
call to fcntl can be bypassed with calls to libsmbclient calls.

The question does not really make sense phrased that way - fcntl is a 
kernel interface and libsmbclient is user space code - but it can issue 
lock calls though - easier just to call cifs to do it though since cifs 
supports byte range locks already 


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list