Skip to content

Commit

Permalink
s3-aio: Remove unused VFS functions and more
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Allison <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed Jul 18, 2012
1 parent be05dad commit 9dc78c9
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 788 deletions.
7 changes: 0 additions & 7 deletions docs-xml/manpages-3/vfs_full_audit.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
complete set of Samba VFS operations:</para>

<simplelist>
<member>aio_cancel</member>
<member>aio_error</member>
<member>aio_fsync</member>
<member>aio_read</member>
<member>aio_return</member>
<member>aio_suspend</member>
<member>aio_write</member>
<member>chdir</member>
<member>chflags</member>
<member>chmod</member>
Expand Down
49 changes: 0 additions & 49 deletions examples/VFS/skel_opaque.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,48 +741,6 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, c
return -1;
}

static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
}

static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
{
errno = ENOSYS;
return -1;
}

static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
{
errno = ENOSYS;
Expand Down Expand Up @@ -931,13 +889,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
.fsetxattr_fn = skel_fsetxattr,

/* aio operations */
.aio_read_fn = skel_aio_read,
.aio_write_fn = skel_aio_write,
.aio_return_fn = skel_aio_return_fn,
.aio_cancel_fn = skel_aio_cancel,
.aio_error_fn = skel_aio_error_fn,
.aio_fsync_fn = skel_aio_fsync,
.aio_suspend_fn = skel_aio_suspend,
.aio_force_fn = skel_aio_force,

/* offline operations */
Expand Down
42 changes: 0 additions & 42 deletions examples/VFS/skel_transparent.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,41 +788,6 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, c
return SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
}

static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
}

static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
}

static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
}

static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
}

static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
}

static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
{
return SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
}

static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
{
return SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
}

static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
{
return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
Expand Down Expand Up @@ -968,13 +933,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
.fsetxattr_fn = skel_fsetxattr,

/* aio operations */
.aio_read_fn = skel_aio_read,
.aio_write_fn = skel_aio_write,
.aio_return_fn = skel_aio_return_fn,
.aio_cancel_fn = skel_aio_cancel,
.aio_error_fn = skel_aio_error_fn,
.aio_fsync_fn = skel_aio_fsync,
.aio_suspend_fn = skel_aio_suspend,
.aio_force_fn = skel_aio_force,

/* offline operations */
Expand Down
12 changes: 0 additions & 12 deletions source3/include/includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,6 @@ struct stat_ex {

typedef struct stat_ex SMB_STRUCT_STAT;

/*
* Type for aiocb structure.
*/

#ifndef SMB_STRUCT_AIOCB
# if defined(HAVE_AIO)
# define SMB_STRUCT_AIOCB struct aiocb
# else
# define SMB_STRUCT_AIOCB int /* AIO not being used but we still need the define.... */
# endif
#endif

enum timestamp_set_resolution {
TIMESTAMP_SET_SECONDS = 0,
TIMESTAMP_SET_MSEC,
Expand Down
14 changes: 0 additions & 14 deletions source3/include/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,6 @@ uint32 unix_dev_minor(SMB_DEV_T dev);
#if 0
int sys_get_number_of_cores(void);
#endif
int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);

struct stat;
void init_stat_ex_from_stat (struct stat_ex *dst,
Expand Down
32 changes: 0 additions & 32 deletions source3/include/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,6 @@ enum vfs_fallocate_mode {
VFS_FALLOCATE_KEEP_SIZE = 1
};

/*
* forward declaration required here until the posix aio functions
* leave the VFS
*/
struct aiocb;

/*
Available VFS operations. These values must be in sync with vfs_ops struct
(struct vfs_fn_pointers and struct vfs_handle_pointers inside of struct vfs_ops).
Expand Down Expand Up @@ -709,13 +703,6 @@ struct vfs_fn_pointers {
int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);

/* aio operations */
int (*aio_read_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int (*aio_write_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
ssize_t (*aio_return_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int (*aio_cancel_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int (*aio_error_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int (*aio_fsync_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
int (*aio_suspend_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout);
bool (*aio_force_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);

/* offline operations */
Expand Down Expand Up @@ -1147,25 +1134,6 @@ int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name,
const void *value, size_t size, int flags);
int smb_vfs_call_aio_read(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int smb_vfs_call_aio_write(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
ssize_t smb_vfs_call_aio_return(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_STRUCT_AIOCB *aiocb);
int smb_vfs_call_aio_cancel(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int smb_vfs_call_aio_error(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_STRUCT_AIOCB *aiocb);
int smb_vfs_call_aio_fsync(struct vfs_handle_struct *handle,
struct files_struct *fsp, int op,
SMB_STRUCT_AIOCB *aiocb);
int smb_vfs_call_aio_suspend(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const SMB_STRUCT_AIOCB * const aiocb[], int n,
const struct timespec *timeout);
bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
struct files_struct *fsp);
bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle,
Expand Down
35 changes: 0 additions & 35 deletions source3/include/vfs_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,41 +573,6 @@
#define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) \
smb_vfs_call_fsetxattr((handle)->next,(fsp),(name),(value),(size),(flags))

#define SMB_VFS_AIO_READ(fsp,aiocb) \
smb_vfs_call_aio_read((fsp)->conn->vfs_handles, (fsp), (aiocb))
#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) \
smb_vfs_call_aio_read((handle)->next,(fsp),(aiocb))

#define SMB_VFS_AIO_WRITE(fsp,aiocb) \
smb_vfs_call_aio_write((fsp)->conn->vfs_handles, (fsp), (aiocb))
#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb) \
smb_vfs_call_aio_write((handle)->next,(fsp),(aiocb))

#define SMB_VFS_AIO_RETURN(fsp,aiocb) \
smb_vfs_call_aio_return((fsp)->conn->vfs_handles, (fsp), (aiocb))
#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb) \
smb_vfs_call_aio_return((handle)->next,(fsp),(aiocb))

#define SMB_VFS_AIO_CANCEL(fsp,aiocb) \
smb_vfs_call_aio_cancel((fsp)->conn->vfs_handles, (fsp), (aiocb))
#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,aiocb) \
smb_vfs_call_aio_cancel((handle)->next,(fsp),(aiocb))

#define SMB_VFS_AIO_ERROR(fsp,aiocb) \
smb_vfs_call_aio_error((fsp)->conn->vfs_handles, (fsp),(aiocb))
#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb) \
smb_vfs_call_aio_error((handle)->next,(fsp),(aiocb))

#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb) \
smb_vfs_call_aio_fsync((fsp)->conn->vfs_handles, (fsp), (op),(aiocb))
#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb) \
smb_vfs_call_aio_fsync((handle)->next,(fsp),(op),(aiocb))

#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts) \
smb_vfs_call_aio_suspend((fsp)->conn->vfs_handles, (fsp),(aiocb),(n),(ts))
#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts) \
smb_vfs_call_aio_suspend((handle)->next,(fsp),(aiocb),(n),(ts))

#define SMB_VFS_AIO_FORCE(fsp) \
smb_vfs_call_aio_force((fsp)->conn->vfs_handles, (fsp))
#define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) \
Expand Down
Loading

0 comments on commit 9dc78c9

Please sign in to comment.