Print this page
Build provider 3rd arg from smb_request_t
hacking...
NEX-1643 dtrace provider for smbsrv
Also illumos 1841:
 DTrace smb provider was mis-implemented, doesn't exist.
Add back handlers for read/write raw, so that
 legacy dtrace consumers can find the probes.
Kill extra arg in smb_negotiate
Fix missing "done" probe with smb_notify
Add example consumer: smb-trace.d
fix soi_pid

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_nt_transact_create.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_nt_transact_create.c
↓ open down ↓ 107 lines elided ↑ open up ↑
 108  108                  if (status != NT_STATUS_SUCCESS) {
 109  109                          smbsr_error(sr, status, 0, 0);
 110  110                          return (SDRC_ERROR);
 111  111                  }
 112  112                  op->sd = kmem_alloc(sizeof (smb_sd_t), KM_SLEEP);
 113  113                  *op->sd = sd;
 114  114          } else {
 115  115                  op->sd = NULL;
 116  116          }
 117  117  
 118      -        DTRACE_SMB_2(op__NtTransactCreate__start, smb_request_t *, sr,
 119      -            struct open_param *, op);
      118 +        DTRACE_SMB_1(op__NtTransactCreate__start, smb_request_t *, sr); /* arg.open */
 120  119  
 121  120          return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
 122  121  }
 123  122  
 124  123  void
 125  124  smb_post_nt_transact_create(smb_request_t *sr, smb_xa_t *xa)
 126  125  {
 127  126          smb_sd_t *sd = sr->arg.open.sd;
      127 +        _NOTE(ARGUNUSED(xa))
 128  128  
 129      -        DTRACE_SMB_2(op__NtTransactCreate__done, smb_request_t *, sr,
 130      -            smb_xa_t *, xa);
      129 +        DTRACE_SMB_1(op__NtTransactCreate__done, smb_request_t *, sr);
 131  130  
 132  131          if (sd) {
 133  132                  smb_sd_term(sd);
 134  133                  kmem_free(sd, sizeof (smb_sd_t));
 135  134          }
 136  135  
 137  136          if (sr->arg.open.dir != NULL) {
 138  137                  smb_ofile_release(sr->arg.open.dir);
 139  138                  sr->arg.open.dir = NULL;
 140  139          }
↓ open down ↓ 153 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX