]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: Convert pread, pwrite and fsync recv interfaces to macros gitlab/master
authorAnoop C S <anoopcs@samba.org>
Fri, 11 Jul 2025 15:10:12 +0000 (20:40 +0530)
committerAnoop C S <anoopcs@samba.org>
Fri, 8 Aug 2025 13:04:52 +0000 (13:04 +0000)
Following the common convention of using uppercase letters for macros,
convert SMB_VFS_PREAD_RECV, SMB_VFS_PWRITE_RECV and SMB_VFS_FSYNC_RECV
functions to equivalent macros.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Aug  8 13:04:52 UTC 2025 on atb-devel-224

source3/include/vfs.h
source3/include/vfs_macros.h
source3/smbd/vfs.c

index 75b81648108898a57bfd9c737463a72e18e30343..ac81b259f21b8fef84200e4165bc2f597b9b6f68 100644 (file)
@@ -1515,7 +1515,8 @@ struct tevent_req *smb_vfs_call_pread_send(struct vfs_handle_struct *handle,
                                           struct files_struct *fsp,
                                           void *data,
                                           size_t n, off_t offset);
-ssize_t SMB_VFS_PREAD_RECV(struct tevent_req *req, struct vfs_aio_state *state);
+ssize_t smb_vfs_call_pread_recv(struct tevent_req *req,
+                               struct vfs_aio_state *state);
 
 ssize_t smb_vfs_call_pwrite(struct vfs_handle_struct *handle,
                            struct files_struct *fsp, const void *data,
@@ -1526,7 +1527,8 @@ struct tevent_req *smb_vfs_call_pwrite_send(struct vfs_handle_struct *handle,
                                            struct files_struct *fsp,
                                            const void *data,
                                            size_t n, off_t offset);
-ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req, struct vfs_aio_state *state);
+ssize_t smb_vfs_call_pwrite_recv(struct tevent_req *req,
+                                struct vfs_aio_state *state);
 
 off_t smb_vfs_call_lseek(struct vfs_handle_struct *handle,
                             struct files_struct *fsp, off_t offset,
@@ -1548,7 +1550,8 @@ struct tevent_req *smb_vfs_call_fsync_send(struct vfs_handle_struct *handle,
                                           TALLOC_CTX *mem_ctx,
                                           struct tevent_context *ev,
                                           struct files_struct *fsp);
-int SMB_VFS_FSYNC_RECV(struct tevent_req *req, struct vfs_aio_state *state);
+int smb_vfs_call_fsync_recv(struct tevent_req *req,
+                           struct vfs_aio_state *state);
 
 int smb_vfs_fsync_sync(files_struct *fsp);
 int smb_vfs_call_stat(struct vfs_handle_struct *handle,
index 723fd48635a853f1dd50324e29c5d51354221066..f2d8174369ab4f5ec401e78e0bd63cea45a4fbe0 100644 (file)
 #define SMB_VFS_PREAD_SEND(mem_ctx, ev, fsp, data, n, off) \
        smb_vfs_call_pread_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
                                (fsp), (data), (n), (off))
+#define SMB_VFS_PREAD_RECV(req, aio_state) \
+       smb_vfs_call_pread_recv((req), (aio_state))
+
 #define SMB_VFS_NEXT_PREAD_SEND(mem_ctx, ev, handle, fsp, data, n, off)        \
        smb_vfs_call_pread_send((handle)->next, (mem_ctx), (ev), (fsp), \
                                (data), (n), (off))
+#define SMB_VFS_NEXT_PREAD_RECV(req, aio_state) \
+       smb_vfs_call_pread_recv((req), (aio_state))
 
 #define SMB_VFS_PWRITE(fsp, data, n, off) \
        smb_vfs_call_pwrite((fsp)->conn->vfs_handles, (fsp), (data), (n), (off))
 #define SMB_VFS_PWRITE_SEND(mem_ctx, ev, fsp, data, n, off) \
        smb_vfs_call_pwrite_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
                                (fsp), (data), (n), (off))
+#define SMB_VFS_PWRITE_RECV(req, aio_state) \
+       smb_vfs_call_pwrite_recv((req), (aio_state))
+
 #define SMB_VFS_NEXT_PWRITE_SEND(mem_ctx, ev, handle, fsp, data, n, off) \
        smb_vfs_call_pwrite_send((handle)->next, (mem_ctx), (ev), (fsp), \
                                (data), (n), (off))
+#define SMB_VFS_NEXT_PWRITE_RECV(req, aio_state) \
+       smb_vfs_call_pwrite_recv((req), (aio_state))
 
 #define SMB_VFS_LSEEK(fsp, offset, whence) \
        smb_vfs_call_lseek((fsp)->conn->vfs_handles, (fsp), (offset), (whence))
 #define SMB_VFS_FSYNC_SEND(mem_ctx, ev, fsp) \
        smb_vfs_call_fsync_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
                                (fsp))
+#define SMB_VFS_FSYNC_RECV(req, aio_state) \
+       smb_vfs_call_fsync_recv((req), (aio_state))
+
 #define SMB_VFS_NEXT_FSYNC_SEND(mem_ctx, ev, handle, fsp)              \
        smb_vfs_call_fsync_send((handle)->next, (mem_ctx), (ev), (fsp))
+#define SMB_VFS_NEXT_FSYNC_RECV(req, aio_state) \
+       smb_vfs_call_fsync_recv((req), (aio_state))
 
 #define SMB_VFS_STAT(conn, smb_fname) \
        smb_vfs_call_stat((conn)->vfs_handles, (smb_fname))
index 76895f52e03995c88b77948818b872d48ce0a001..82fe586506fc92a06480b81ca1da3aa680312ad6 100644 (file)
@@ -1687,8 +1687,8 @@ static void smb_vfs_call_pread_done(struct tevent_req *subreq)
        tevent_req_done(req);
 }
 
-ssize_t SMB_VFS_PREAD_RECV(struct tevent_req *req,
-                          struct vfs_aio_state *vfs_aio_state)
+ssize_t smb_vfs_call_pread_recv(struct tevent_req *req,
+                               struct vfs_aio_state *vfs_aio_state)
 {
        struct smb_vfs_call_pread_state *state = tevent_req_data(
                req, struct smb_vfs_call_pread_state);
@@ -1763,8 +1763,8 @@ static void smb_vfs_call_pwrite_done(struct tevent_req *subreq)
        tevent_req_done(req);
 }
 
-ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req,
-                           struct vfs_aio_state *vfs_aio_state)
+ssize_t smb_vfs_call_pwrite_recv(struct tevent_req *req,
+                                struct vfs_aio_state *vfs_aio_state)
 {
        struct smb_vfs_call_pwrite_state *state = tevent_req_data(
                req, struct smb_vfs_call_pwrite_state);
@@ -1869,7 +1869,8 @@ static void smb_vfs_call_fsync_done(struct tevent_req *subreq)
        tevent_req_done(req);
 }
 
-int SMB_VFS_FSYNC_RECV(struct tevent_req *req, struct vfs_aio_state *vfs_aio_state)
+int smb_vfs_call_fsync_recv(struct tevent_req *req,
+                           struct vfs_aio_state *vfs_aio_state)
 {
        struct smb_vfs_call_fsync_state *state = tevent_req_data(
                req, struct smb_vfs_call_fsync_state);