The Samba-Bugzilla – Attachment 6358 Details for
Bug 8048
make SMBTA work when sendfile = yes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Enable sendfile = yes recognition
0001-SMBTA-make-vfs_smb_traffic_analyzer-aware-of-the.patch (text/plain), 2.30 KB, created by
Holger Hetterich
on 2011-03-29 20:19:25 UTC
(
hide
)
Description:
Enable sendfile = yes recognition
Filename:
MIME Type:
Creator:
Holger Hetterich
Created:
2011-03-29 20:19:25 UTC
Size:
2.30 KB
patch
obsolete
>From f802ebb7cbe9b1ddda10bb60858823158d091be7 Mon Sep 17 00:00:00 2001 >From: Holger Hetterich <hhetter@novell.com> >Date: Tue, 29 Mar 2011 22:16:10 +0200 >Subject: [PATCH] SMBTA: make vfs_smb_traffic_analyzer aware of the > sendfile and recvfile functionality and store the > results as common read/write results. > >--- > source3/modules/vfs_smb_traffic_analyzer.c | 42 +++++++++++++++++++++++++++- > 1 files changed, 41 insertions(+), 1 deletions(-) > >diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c >index 1d8c75b..8fe6f30 100644 >--- a/source3/modules/vfs_smb_traffic_analyzer.c >+++ b/source3/modules/vfs_smb_traffic_analyzer.c >@@ -756,6 +756,44 @@ static int smb_traffic_analyzer_mkdir(vfs_handle_struct *handle, \ > return s_data.result; > } > >+static ssize_t smb_traffic_analyzer_sendfile(vfs_handle_struct *handle, >+ int tofd, >+ files_struct *fromfsp, >+ const DATA_BLOB *hdr, >+ SMB_OFF_T offset, >+ size_t n) >+{ >+ struct rw_data s_data; >+ s_data.len = SMB_VFS_NEXT_SENDFILE(handle, >+ tofd, fromfsp, hdr, offset, n); >+ s_data.filename = fromfsp->fsp_name->base_name; >+ DEBUG(10, ("smb_traffic_analyzer_sendfile: sendfile(r): %s\n", >+ fsp_str_dbg(fromfsp))); >+ smb_traffic_analyzer_send_data(handle, >+ &s_data, >+ vfs_id_read); >+ return s_data.len; >+} >+ >+static ssize_t smb_traffic_analyzer_recvfile(vfs_handle_struct *handle, >+ int fromfd, >+ files_struct *tofsp, >+ SMB_OFF_T offset, >+ size_t n) >+{ >+ struct rw_data s_data; >+ s_data.len = SMB_VFS_NEXT_RECVFILE(handle, >+ fromfd, tofsp, offset, n); >+ s_data.filename = tofsp->fsp_name->base_name; >+ DEBUG(10, ("smb_traffic_analyzer_recvfile: recvfile(w): %s\n", >+ fsp_str_dbg(tofsp))); >+ smb_traffic_analyzer_send_data(handle, >+ &s_data, >+ vfs_id_write); >+ return s_data.len; >+} >+ >+ > static ssize_t smb_traffic_analyzer_read(vfs_handle_struct *handle, \ > files_struct *fsp, void *data, size_t n) > { >@@ -865,7 +903,9 @@ static struct vfs_fn_pointers vfs_smb_traffic_analyzer_fns = { > .chdir = smb_traffic_analyzer_chdir, > .open = smb_traffic_analyzer_open, > .rmdir = smb_traffic_analyzer_rmdir, >- .close_fn = smb_traffic_analyzer_close >+ .close_fn = smb_traffic_analyzer_close, >+ .sendfile = smb_traffic_analyzer_sendfile, >+ .recvfile = smb_traffic_analyzer_recvfile > }; > > /* Module initialization */ >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 8048
: 6358