/* The following definitions come from smbd/aio.c */
+bool initialize_async_io_handler(void);
NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
struct smb_request *req,
- files_struct *fsp, SMB_OFF_T startpos,
+ files_struct *fsp, off_t startpos,
size_t smb_maxcnt);
NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
struct smb_request *req,
files_struct *fsp, const char *data,
- SMB_OFF_T startpos,
+ off_t startpos,
size_t numtowrite);
NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
struct smb_request *smbreq,
files_struct *fsp,
TALLOC_CTX *ctx,
DATA_BLOB *preadbuf,
- SMB_OFF_T startpos,
+ off_t startpos,
size_t smb_maxcnt);
NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
struct smb_request *smbreq,
bool write_through);
bool cancel_smb2_aio(struct smb_request *smbreq);
int wait_for_aio_completion(files_struct *fsp);
-void cancel_aio_by_fsp(files_struct *fsp);
void smbd_aio_complete_aio_ex(struct aio_extra *aio_ex);
/* The following definitions come from smbd/blocking.c */
char *buf,
const char *mask,
const char *fname,
- SMB_OFF_T size,
+ off_t size,
uint32 mode,
time_t date,
bool uc);
const char *mask,
uint32 dirtype,
char **pp_fname_out,
- SMB_OFF_T *size,
+ off_t *size,
uint32 *mode,
struct timespec *date,
bool check_descend,
/* The following definitions come from smbd/fileio.c */
-ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
+ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n);
void update_write_time_handler(struct event_context *ctx,
struct timed_event *te,
struct timeval now,
ssize_t write_file(struct smb_request *req,
files_struct *fsp,
const char *data,
- SMB_OFF_T pos,
+ off_t pos,
size_t n);
void delete_write_cache(files_struct *fsp);
-void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size);
+void set_filelen_write_cache(files_struct *fsp, off_t file_size);
ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason);
NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_through);
int fsp_stat(files_struct *fsp);
struct notify_context *notify_init(TALLOC_CTX *mem_ctx,
struct messaging_context *messaging_ctx,
struct event_context *ev);
-bool notify_internal_parent_init(TALLOC_CTX *mem_ctx);
-NTSTATUS notify_add(struct notify_context *notify, connection_struct *conn,
- struct notify_entry *e0,
+NTSTATUS notify_add(struct notify_context *notify,
+ const char *path, uint32_t filter, uint32_t subdir_filter,
void (*callback)(void *, const struct notify_event *),
void *private_data);
NTSTATUS notify_remove(struct notify_context *notify, void *private_data);
-NTSTATUS notify_remove_onelevel(struct notify_context *notify,
- const struct file_id *fid,
- void *private_data);
-void notify_onelevel(struct notify_context *notify, uint32_t action,
- uint32_t filter, struct file_id fid, const char *name);
void notify_trigger(struct notify_context *notify,
uint32_t action, uint32_t filter, const char *path);
+void notify_walk_idx(struct notify_context *notify,
+ void (*fn)(const char *path,
+ uint32_t *vnns, size_t num_vnns,
+ void *private_data),
+ void *private_data);
+void notify_walk(struct notify_context *notify,
+ void (*fn)(const char *path,
+ struct notify_db_entry *entries,
+ size_t num_entries,
+ time_t deleted_time, void *private_data),
+ void *private_data);
+void notify_cleanup(struct notify_context *notify);
+
+struct tevent_req *notify_cluster_proxy_send(
+ TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+ struct notify_context *notify);
+int notify_cluster_proxy_recv(struct tevent_req *req);
/* The following definitions come from smbd/ntquotas.c */
void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e);
void message_to_share_mode_entry(struct share_mode_entry *e, char *msg);
bool init_oplocks(struct smbd_server_connection *sconn);
+void init_kernel_oplocks(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/oplock_irix.c */
int linux_setlease(int fd, int leasetype);
struct kernel_oplocks *linux_init_kernel_oplocks(struct smbd_server_connection *sconn);
-/* The following definitions come from smbd/oplock_onefs.c */
-
-struct kernel_oplocks *onefs_init_kernel_oplocks(struct smbd_server_connection *sconn);
-
/* The following definitions come from smbd/password.c */
user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
uint32 dirtype, struct smb_filename *smb_fname,
bool has_wild);
void reply_unlink(struct smb_request *req);
-ssize_t fake_sendfile(files_struct *fsp, SMB_OFF_T startpos, size_t nread);
+ssize_t fake_sendfile(files_struct *fsp, off_t startpos, size_t nread);
void sendfile_short_send(files_struct *fsp,
ssize_t nread,
size_t headersize,
bool unix_token_equal(const struct security_unix_token *t1, const struct security_unix_token *t2);
bool push_sec_ctx(void);
-void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, struct security_token *token);
+void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, const struct security_token *token);
void set_root_sec_ctx(void);
bool pop_sec_ctx(void);
void init_sec_ctx(void);
NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname);
ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
ssize_t vfs_pread_data(files_struct *fsp, char *buf,
- size_t byte_count, SMB_OFF_T offset);
+ size_t byte_count, off_t offset);
ssize_t vfs_write_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,
files_struct *fsp,
const char *buffer,
size_t N,
- SMB_OFF_T offset);
+ off_t offset);
int vfs_allocate_file_space(files_struct *fsp, uint64_t len);
-int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
-int vfs_slow_fallocate(files_struct *fsp, SMB_OFF_T offset, SMB_OFF_T len);
-int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len);
-SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
+int vfs_set_filelen(files_struct *fsp, off_t len);
+int vfs_slow_fallocate(files_struct *fsp, off_t offset, off_t len);
+int vfs_fill_sparse(files_struct *fsp, off_t len);
+off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n);
const char *vfs_readdirname(connection_struct *conn, void *p,
SMB_STRUCT_STAT *sbuf, char **talloced);
int vfs_ChDir(connection_struct *conn, const char *path);