Print this page
NEX-4820 intended nbmand locking functionality is confused
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
SMB-11 SMB2 message parse & dispatch
SMB-12 SMB2 Negotiate Protocol
SMB-13 SMB2 Session Setup
SMB-14 SMB2 Logoff
SMB-15 SMB2 Tree Connect
SMB-16 SMB2 Tree Disconnect
SMB-17 SMB2 Create
SMB-18 SMB2 Close
SMB-19 SMB2 Flush
SMB-20 SMB2 Read
SMB-21 SMB2 Write
SMB-22 SMB2 Lock/Unlock
SMB-23 SMB2 Ioctl
SMB-24 SMB2 Cancel
SMB-25 SMB2 Echo
SMB-26 SMB2 Query Dir
SMB-27 SMB2 Change Notify
SMB-28 SMB2 Query Info
SMB-29 SMB2 Set Info
SMB-30 SMB2 Oplocks
SMB-53 SMB2 Create Context options
(SMB2 code review cleanup 1, 2, 3)
SMB-72 Improve startup/shudown debug features
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>
        
*** 18,28 ****
   *
   * CDDL HEADER END
   */
  /*
   * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
!  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
   */
  
  #include <sys/types.h>
  #include <sys/ddi.h>
  #include <sys/modctl.h>
--- 18,28 ----
   *
   * CDDL HEADER END
   */
  /*
   * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
!  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
   */
  
  #include <sys/types.h>
  #include <sys/ddi.h>
  #include <sys/modctl.h>
*** 47,76 ****
   * IR104720 Experiments with Windows 2000 indicate that we achieve better
   * SmbWriteX performance with a buffer size of 64KB instead of the 37KB used
   * with Windows NT4.0. Previous experiments with NT4.0 resulted in directory
   * listing problems so this buffer size is configurable based on the end-user
   * environment. When in doubt use 37KB.
-  *
-  * smb_raw_mode: read_raw and write_raw supported (1) or NOT supported (0).
   */
  int     smb_maxbufsize = SMB_NT_MAXBUF;
- int     smb_oplock_levelII = 1;
- int     smb_oplock_timeout = OPLOCK_STD_TIMEOUT;
- int     smb_oplock_min_timeout = OPLOCK_MIN_TIMEOUT;
  int     smb_flush_required = 1;
  int     smb_dirsymlink_enable = 1;
  int     smb_sign_debug = 0;
- int     smb_raw_mode = 0;
  int     smb_shortnames = 1;
  uint_t  smb_audit_flags =
  #ifdef  DEBUG
      SMB_AUDIT_NODE;
  #else
      0;
  #endif
  
  /*
   * Maximum number of simultaneous authentication, share mapping, pipe open
   * requests to be processed.
   */
  int     smb_ssetup_threshold = 256;
  int     smb_tcon_threshold = 1024;
--- 47,81 ----
   * IR104720 Experiments with Windows 2000 indicate that we achieve better
   * SmbWriteX performance with a buffer size of 64KB instead of the 37KB used
   * with Windows NT4.0. Previous experiments with NT4.0 resulted in directory
   * listing problems so this buffer size is configurable based on the end-user
   * environment. When in doubt use 37KB.
   */
  int     smb_maxbufsize = SMB_NT_MAXBUF;
  int     smb_flush_required = 1;
  int     smb_dirsymlink_enable = 1;
  int     smb_sign_debug = 0;
  int     smb_shortnames = 1;
  uint_t  smb_audit_flags =
  #ifdef  DEBUG
      SMB_AUDIT_NODE;
  #else
      0;
  #endif
  
  /*
+  * We don't normally have nbmand support in the test share
+  * used by fksmbd, but we'd still like the locking code
+  * to be testable.  Intereactions with NFS etc. are not a
+  * concern in fksmbd, so allow it to use advisory locks.
+  *
+  * Should fix the fksmbd test share so it supports nbmand,
+  * and then set this to zero like the real server.
+  */
+ int smb_allow_advisory_locks = 1;       /* See smb_vops.c */
+ 
+ /*
   * Maximum number of simultaneous authentication, share mapping, pipe open
   * requests to be processed.
   */
  int     smb_ssetup_threshold = 256;
  int     smb_tcon_threshold = 1024;
*** 134,146 ****
  }
  
  int
  fksmbsrv_drv_close(void)
  {
          int rc;
  
!         rc = smb_server_delete();
  
          if (g_init_done != 0) {
                  smb_server_g_fini();
                  g_init_done = 0;
          }
--- 139,154 ----
  }
  
  int
  fksmbsrv_drv_close(void)
  {
+         smb_server_t *sv;
          int rc;
  
!         rc = smb_server_lookup(&sv);
!         if (rc == 0)
!                 rc = smb_server_delete(sv);
  
          if (g_init_done != 0) {
                  smb_server_g_fini();
                  g_init_done = 0;
          }