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>
NEX-3620 need upstream cleanups for smbsrv
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
NEX-2485 SMB authentication flood handled poorly
SUP-866 smbd lwps stuck in libsocket recv() for no apparent reason
SMB-74 Process oplock breaks as session requests
SMB-69 read-raw, write-raw are dead code
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>
SUP-694 panic on bad mutex in smb_event_wait() - nits
SMB-65 SMB server in non-global zones (kmem_caches)
common kmem_cache instances across zones
separate GZ-only init from NGZ init
SMB-64 smbsrv workers run at excessively high priority
re #6811 rb1752 backport illumos 1603 smbsrv raw mode is ill-advised

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_init.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_init.c
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57  
  58   58  /*
  59   59   * Maximum buffer size for NT: configurable based on the client environment.
  60   60   * IR104720 Experiments with Windows 2000 indicate that we achieve better
  61   61   * SmbWriteX performance with a buffer size of 64KB instead of the 37KB used
  62   62   * with Windows NT4.0. Previous experiments with NT4.0 resulted in directory
  63   63   * listing problems so this buffer size is configurable based on the end-user
  64   64   * environment. When in doubt use 37KB.
  65   65   */
  66   66  int     smb_maxbufsize = SMB_NT_MAXBUF;
  67      -int     smb_oplock_levelII = 1;
  68      -int     smb_oplock_timeout = OPLOCK_STD_TIMEOUT;
  69      -int     smb_oplock_min_timeout = OPLOCK_MIN_TIMEOUT;
  70   67  int     smb_flush_required = 1;
  71   68  int     smb_dirsymlink_enable = 1;
  72   69  int     smb_sign_debug = 0;
  73   70  int     smb_shortnames = 1;
  74   71  uint_t  smb_audit_flags =
  75   72  #ifdef  DEBUG
  76   73      SMB_AUDIT_NODE;
  77   74  #else
  78   75      0;
  79   76  #endif
  80   77  
       78 +int smb_allow_advisory_locks = 0;       /* See smb_vops.c */
       79 +
  81   80  /*
  82   81   * Maximum number of simultaneous authentication, share mapping, pipe open
  83   82   * requests to be processed.
  84   83   */
  85   84  int     smb_ssetup_threshold = SMB_AUTHSVC_MAXTHREAD;
  86   85  int     smb_tcon_threshold = 1024;
  87   86  int     smb_opipe_threshold = 1024;
  88   87  
  89   88  /*
  90   89   * Number of milliseconds that a request will be stalled if it comes in after
↓ open down ↓ 150 lines elided ↑ open up ↑
 241  240          /*
 242  241           * Start SMB service state machine
 243  242           */
 244  243          return (smb_server_create());
 245  244  }
 246  245  
 247  246  /* ARGSUSED */
 248  247  static int
 249  248  smb_drv_close(dev_t dev, int flag, int otyp, cred_t *credp)
 250  249  {
 251      -        return (smb_server_delete());
      250 +        smb_server_t    *sv;
      251 +        int             rc;
      252 +
      253 +        rc = smb_server_lookup(&sv);
      254 +        if (rc == 0)
      255 +                rc = smb_server_delete(sv);
      256 +
      257 +        return (rc);
 252  258  }
 253  259  
 254  260  /* ARGSUSED */
 255  261  static int
 256  262  smb_drv_ioctl(dev_t drv, int cmd, intptr_t argp, int flags, cred_t *cred,
 257  263      int *retval)
 258  264  {
 259  265          smb_ioc_t       *ioc;
 260  266          smb_ioc_header_t ioc_hdr;
 261  267          uint32_t        crc;
↓ open down ↓ 155 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX