summaryrefslogtreecommitdiff
path: root/examples/VFS
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-06-04 13:50:33 +0200
committerRalph Boehme <slow@samba.org>2017-07-03 19:59:08 +0200
commit64bedefa117b4861a752c4e2fc3f5e775eb7f542 (patch)
tree163d6b87accce620193f4125fb4a886cd426ea47 /examples/VFS
parent67ed1edba75e967d7d8d4157f918b50d23c47b0b (diff)
downloadsamba-64bedefa117b4861a752c4e2fc3f5e775eb7f542.tar.gz
s3/vfs: rename SMB_VFS_COPY_CHUNK_SEND/RECV to SMB_VFS_OFFLOAD_WRITE_SEND/RECV
No change in behaviour, just a rename in preperation of more changes to SMB_VFS_OFFLOAD_WRITE_SEND. It helps keeping the diff of the actual changes smaller. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'examples/VFS')
-rw-r--r--examples/VFS/skel_opaque.c8
-rw-r--r--examples/VFS/skel_transparent.c38
2 files changed, 23 insertions, 23 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 2294375d94f..d416bf6ef53 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -582,7 +582,7 @@ static NTSTATUS skel_offload_read_recv(struct tevent_req *req,
struct skel_cc_state {
uint64_t unused;
};
-static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
+static struct tevent_req *skel_offload_write_send(struct vfs_handle_struct *handle,
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct files_struct *src_fsp,
@@ -604,7 +604,7 @@ static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
return tevent_req_post(req, ev);
}
-static NTSTATUS skel_copy_chunk_recv(struct vfs_handle_struct *handle,
+static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied)
{
@@ -1011,8 +1011,8 @@ struct vfs_fn_pointers skel_opaque_fns = {
.file_id_create_fn = skel_file_id_create,
.offload_read_send_fn = skel_offload_read_send,
.offload_read_recv_fn = skel_offload_read_recv,
- .copy_chunk_send_fn = skel_copy_chunk_send,
- .copy_chunk_recv_fn = skel_copy_chunk_recv,
+ .offload_write_send_fn = skel_offload_write_send,
+ .offload_write_recv_fn = skel_offload_write_recv,
.get_compression_fn = skel_get_compression,
.set_compression_fn = skel_set_compression,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 51312f2c876..58fd77a9d51 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -710,13 +710,13 @@ static NTSTATUS skel_offload_read_recv(struct tevent_req *req,
return NT_STATUS_OK;
}
-struct skel_cc_state {
+struct skel_offload_write_state {
struct vfs_handle_struct *handle;
off_t copied;
};
-static void skel_copy_chunk_done(struct tevent_req *subreq);
+static void skel_offload_write_done(struct tevent_req *subreq);
-static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
+static struct tevent_req *skel_offload_write_send(struct vfs_handle_struct *handle,
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct files_struct *src_fsp,
@@ -728,36 +728,36 @@ static struct tevent_req *skel_copy_chunk_send(struct vfs_handle_struct *handle,
{
struct tevent_req *req;
struct tevent_req *subreq;
- struct skel_cc_state *cc_state;
+ struct skel_offload_write_state *state;
- req = tevent_req_create(mem_ctx, &cc_state, struct skel_cc_state);
+ req = tevent_req_create(mem_ctx, &state, struct skel_offload_write_state);
if (req == NULL) {
return NULL;
}
- cc_state->handle = handle;
- subreq = SMB_VFS_NEXT_COPY_CHUNK_SEND(handle, cc_state, ev,
+ state->handle = handle;
+ subreq = SMB_VFS_NEXT_OFFLOAD_WRITE_SEND(handle, state, ev,
src_fsp, src_off,
dest_fsp, dest_off, num, flags);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
- tevent_req_set_callback(subreq, skel_copy_chunk_done, req);
+ tevent_req_set_callback(subreq, skel_offload_write_done, req);
return req;
}
-static void skel_copy_chunk_done(struct tevent_req *subreq)
+static void skel_offload_write_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
- struct skel_cc_state *cc_state
- = tevent_req_data(req, struct skel_cc_state);
+ struct skel_offload_write_state *state
+ = tevent_req_data(req, struct skel_offload_write_state);
NTSTATUS status;
- status = SMB_VFS_NEXT_COPY_CHUNK_RECV(cc_state->handle,
+ status = SMB_VFS_NEXT_OFFLOAD_WRITE_RECV(state->handle,
subreq,
- &cc_state->copied);
+ &state->copied);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
@@ -765,15 +765,15 @@ static void skel_copy_chunk_done(struct tevent_req *subreq)
tevent_req_done(req);
}
-static NTSTATUS skel_copy_chunk_recv(struct vfs_handle_struct *handle,
+static NTSTATUS skel_offload_write_recv(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied)
{
- struct skel_cc_state *cc_state
- = tevent_req_data(req, struct skel_cc_state);
+ struct skel_offload_write_state *state
+ = tevent_req_data(req, struct skel_offload_write_state);
NTSTATUS status;
- *copied = cc_state->copied;
+ *copied = state->copied;
if (tevent_req_is_nterror(req, &status)) {
tevent_req_received(req);
return status;
@@ -1184,8 +1184,8 @@ struct vfs_fn_pointers skel_transparent_fns = {
.file_id_create_fn = skel_file_id_create,
.offload_read_send_fn = skel_offload_read_send,
.offload_read_recv_fn = skel_offload_read_recv,
- .copy_chunk_send_fn = skel_copy_chunk_send,
- .copy_chunk_recv_fn = skel_copy_chunk_recv,
+ .offload_write_send_fn = skel_offload_write_send,
+ .offload_write_recv_fn = skel_offload_write_recv,
.get_compression_fn = skel_get_compression,
.set_compression_fn = skel_set_compression,