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>
SMB-65 SMB server in non-global zones (data structure changes)
Many things move to the smb_server_t object, and
many functions gain an sv arg (which server).
re #7815 SMB server delivers old modification time...
re #6812 rb1753 backport illumos 1604 smbd print_enable doesn't really work
*** 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.
*/
/*
* SMB print interface.
*/
--- 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.
*/
/*
* SMB print interface.
*/
*** 76,95 ****
(void) snprintf(path, MAXPATHLEN, "%s%05u", identifier, new_id);
}
op->create_disposition = FILE_OVERWRITE_IF;
op->create_options = FILE_NON_DIRECTORY_FILE;
! DTRACE_SMB_2(op__OpenPrintFile__start, smb_request_t *, sr,
! struct open_param *, op);
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_open_print_file(smb_request_t *sr)
{
! DTRACE_SMB_1(op__OpenPrintFile__done, smb_request_t *, sr);
}
/*
* Creates a new spool file which will be later copied and
* deleted by cupsd. After the file is created, information
--- 76,94 ----
(void) snprintf(path, MAXPATHLEN, "%s%05u", identifier, new_id);
}
op->create_disposition = FILE_OVERWRITE_IF;
op->create_options = FILE_NON_DIRECTORY_FILE;
! DTRACE_SMB_START(op__OpenPrintFile, smb_request_t *, sr); /* arg.open */
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_open_print_file(smb_request_t *sr)
{
! DTRACE_SMB_DONE(op__OpenPrintFile, smb_request_t *, sr);
}
/*
* Creates a new spool file which will be later copied and
* deleted by cupsd. After the file is created, information
*** 156,173 ****
{
int rc;
rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid);
! DTRACE_SMB_1(op__ClosePrintFile__start, smb_request_t *, sr);
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_close_print_file(smb_request_t *sr)
{
! DTRACE_SMB_1(op__ClosePrintFile__done, smb_request_t *, sr);
}
/*
*
* Adds the print file fid to a list to be used as a search
--- 155,172 ----
{
int rc;
rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid);
! DTRACE_SMB_START(op__ClosePrintFile, smb_request_t *, sr);
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_close_print_file(smb_request_t *sr)
{
! DTRACE_SMB_DONE(op__ClosePrintFile, smb_request_t *, sr);
}
/*
*
* Adds the print file fid to a list to be used as a search
*** 207,224 ****
* this request is optional (not required for Windows clients).
*/
smb_sdrc_t
smb_pre_get_print_queue(smb_request_t *sr)
{
! DTRACE_SMB_1(op__GetPrintQueue__start, smb_request_t *, sr);
return (SDRC_SUCCESS);
}
void
smb_post_get_print_queue(smb_request_t *sr)
{
! DTRACE_SMB_1(op__GetPrintQueue__done, smb_request_t *, sr);
}
smb_sdrc_t
smb_com_get_print_queue(smb_request_t *sr)
{
--- 206,223 ----
* this request is optional (not required for Windows clients).
*/
smb_sdrc_t
smb_pre_get_print_queue(smb_request_t *sr)
{
! DTRACE_SMB_START(op__GetPrintQueue, smb_request_t *, sr);
return (SDRC_SUCCESS);
}
void
smb_post_get_print_queue(smb_request_t *sr)
{
! DTRACE_SMB_DONE(op__GetPrintQueue, smb_request_t *, sr);
}
smb_sdrc_t
smb_com_get_print_queue(smb_request_t *sr)
{
*** 253,270 ****
sr->arg.rw = param;
param->rw_magic = SMB_RW_MAGIC;
rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid);
! DTRACE_SMB_1(op__WritePrintFile__start, smb_request_t *, sr);
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_write_print_file(smb_request_t *sr)
{
! DTRACE_SMB_1(op__WritePrintFile__done, smb_request_t *, sr);
kmem_free(sr->arg.rw, sizeof (smb_rw_param_t));
}
smb_sdrc_t
--- 252,269 ----
sr->arg.rw = param;
param->rw_magic = SMB_RW_MAGIC;
rc = smbsr_decode_vwv(sr, "w", &sr->smb_fid);
! DTRACE_SMB_START(op__WritePrintFile, smb_request_t *, sr);
return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
}
void
smb_post_write_print_file(smb_request_t *sr)
{
! DTRACE_SMB_DONE(op__WritePrintFile, smb_request_t *, sr);
kmem_free(sr->arg.rw, sizeof (smb_rw_param_t));
}
smb_sdrc_t