Print this page
NEX-1643 dtrace provider for smbsrv
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
NEX-8495 Panic after SMB flush on a named pipe
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_flush.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_flush.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   *
  25   25   * Copyright 2016 Syneto S.R.L. All rights reserved.
       26 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  26   27   */
  27   28  
  28   29  /*
  29   30   * The flush SMB is sent to ensure all data and allocation information
  30   31   * for the corresponding file has been written to stable storage. This
  31   32   * is a synchronous request. The response should not be sent until the
  32   33   * writes are complete.
  33   34   *
  34   35   * The SmbFlush request is described in CIFS/1.0 1996 Section 3.9.14.
  35   36   *
↓ open down ↓ 17 lines elided ↑ open up ↑
  53   54   * We need to protect the list because there's a good chance we'll
  54   55   * block during the flush operation.
  55   56   */
  56   57  smb_sdrc_t
  57   58  smb_pre_flush(smb_request_t *sr)
  58   59  {
  59   60          int rc;
  60   61  
  61   62          rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid);
  62   63  
  63      -        DTRACE_SMB_1(op__Flush__start, smb_request_t *, sr);
       64 +        DTRACE_SMB_START(op__Flush, smb_request_t *, sr);
  64   65  
  65   66          return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
  66   67  }
  67   68  
  68   69  void
  69   70  smb_post_flush(smb_request_t *sr)
  70   71  {
  71      -        DTRACE_SMB_1(op__Flush__done, smb_request_t *, sr);
       72 +        DTRACE_SMB_DONE(op__Flush, smb_request_t *, sr);
  72   73  }
  73   74  
  74   75  smb_sdrc_t
  75   76  smb_com_flush(smb_request_t *sr)
  76   77  {
  77   78          smb_ofile_t     *file;
  78   79          smb_llist_t     *flist;
  79   80          int             rc;
  80   81  
  81   82          if (smb_flush_required == 0) {
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX