svn commit: samba r3081 - in branches/SAMBA_4_0/source: include libcli/raw ntvfs ntvfs/cifs ntvfs/ipc ntvfs/nbench ntvfs/posix smb_server

tridge at samba.org tridge at samba.org
Wed Oct 20 08:28:35 GMT 2004


Author: tridge
Date: 2004-10-20 08:28:31 +0000 (Wed, 20 Oct 2004)
New Revision: 3081

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3081&nolog=1

Log:
several updates to ntvfs and server side async request handling in
preparation for the full share modes and ntcreatex code that I am
working on.

highlights include:

 - changed the way a backend determines if it is allowed to process a
   request asynchronously. The previous method of looking at the
   send_fn caused problems when an intermediate ntvfs module disabled
   it, and the caller then wanted to finished processing using this
   function. The new method is a REQ_CONTROL_MAY_ASYNC flag in
   req->control_flags, which is also a bit easier to read

 - fixed 2 bugs in the readbraw server code. One related to trying to
   answer a readbraw with smb signing (which can't work, and crashed
   our signing code), the second related to error handling, which
   attempted to send a normal SMB error packet, when readbraw must
   send a 0 read reply (as it has no header)
 
 - added several more ntvfs_generic.c generic mapping functions. This
   means that backends no longer need to implement such esoteric
   functions as SMBwriteunlock() if they don't want to. The backend
   can just request the mapping layer turn it into a write followed by
   an unlock. This makes the backends considerably simpler as they
   only need to implement one style of each function for lock, read,
   write, open etc, rather than the full host of functions that SMB
   provides. A backend can still choose to implement them
   individually, of course, and the CIFS backend does that.

 - simplified the generic structures to make them identical to the
   principal call for several common SMB calls (such as
   RAW_WRITE_GENERIC now being an alias for RAW_WRITE_WRITEX).

 - started rewriting the pvfs_open() code in preparation for the full
   ntcreatex semantics.

 - in pvfs_open and ipc_open, initially allocate the open file
   structure as a child of the request, so on error we don't need to
   clean up. Then when we are going to succeed the open steal the
   pointer into the long term backend context. This makes for much
   simpler error handling (and fixes some bugs)

 - use a destructor in the ipc backend to make sure that everthing is
   cleaned up on receive error conditions.

 - switched the ipc backend to using idtree for fnum allocation

 - in the ntvfs_generic mapping routines, use a allocated secondary
   structure not a stack structure to ensure the request pointer
   remains valid even if the backend replies async.


Modified:
   branches/SAMBA_4_0/source/include/smb.h
   branches/SAMBA_4_0/source/include/smb_interfaces.h
   branches/SAMBA_4_0/source/libcli/raw/rawfile.c
   branches/SAMBA_4_0/source/libcli/raw/rawreadwrite.c
   branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
   branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
   branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
   branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_lock.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_read.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_write.c
   branches/SAMBA_4_0/source/smb_server/reply.c
   branches/SAMBA_4_0/source/smb_server/search.c
   branches/SAMBA_4_0/source/smb_server/smb_server.h


Changeset:
Sorry, the patch is too large (2383 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3081&nolog=1


More information about the samba-cvs mailing list