summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_time_audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_time_audit.c')
-rw-r--r--source3/modules/vfs_time_audit.c148
1 files changed, 0 insertions, 148 deletions
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index a9b806a69a..16eb624ebb 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -2225,147 +2225,6 @@ static int smb_time_audit_fsetxattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_aio_read(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_read", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_write(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_write", timediff);
- }
-
- return result;
-}
-
-static ssize_t smb_time_audit_aio_return(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- ssize_t result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_return", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_cancel(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_cancel", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_error(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_error", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_fsync(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int op,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_fsync", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_suspend(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- const SMB_STRUCT_AIOCB * const aiocb[],
- int n, const struct timespec *ts)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_suspend", timediff);
- }
-
- return result;
-}
-
static bool smb_time_audit_aio_force(struct vfs_handle_struct *handle,
struct files_struct *fsp)
{
@@ -2495,13 +2354,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.fremovexattr_fn = smb_time_audit_fremovexattr,
.setxattr_fn = smb_time_audit_setxattr,
.fsetxattr_fn = smb_time_audit_fsetxattr,
- .aio_read_fn = smb_time_audit_aio_read,
- .aio_write_fn = smb_time_audit_aio_write,
- .aio_return_fn = smb_time_audit_aio_return,
- .aio_cancel_fn = smb_time_audit_aio_cancel,
- .aio_error_fn = smb_time_audit_aio_error,
- .aio_fsync_fn = smb_time_audit_aio_fsync,
- .aio_suspend_fn = smb_time_audit_aio_suspend,
.aio_force_fn = smb_time_audit_aio_force,
};