summaryrefslogtreecommitdiff
path: root/source3/modules/offload_token.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-08smbd: replace CHECK_WRITE() macro with calls to check_any_access_fsp()Ralph Boehme1-2/+5
The additional check if fd underlying fd is valid and not -1 should not be done at this place. I actually would prefer an write to fail with EBADF if this happens, as it's likely easier to debug why this happened. These days we should always have a valid fd. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-10-08vfs: add and use a few SMB_VFS_ODX definesRalph Boehme1-3/+9
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Oct 8 20:21:21 UTC 2021 on sn-devel-184
2020-04-03smbd: move files_struct.closing to a bitfieldRalph Boehme1-2/+2
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-04-03smbd: move files_struct.is_directory to a bitfieldRalph Boehme1-2/+2
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-03-23s3: smbd: Remove all references to fsp->deferred_close.Jeremy Allison1-10/+0
We are now free to remove it from struct files_struct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-18s3: smbd: Every place we check fsp->deferred_close, also check for fsp->closing.Jeremy Allison1-0/+10
Eventually this will allow us to remove fsp->deferred_close from the fsp struct (and also source3/lib/tevent_wait.[ch]). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-22vfs: Use dbwrap_do_locked() in vfs_offload_token_db_store_fsp()Volker Lendecke1-46/+63
Less malloc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-22vfs: Use dbwrap_parse_record() in vfs_offload_token_db_fetch_fsp()Volker Lendecke1-24/+34
Less malloc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-07-03s3/vfs: make SMB_VFS_OFFLOAD_WRITE_SEND offload token basedRalph Boehme1-0/+90
Remove the source fsp argument and instead pass the offload token generated with SMB_VFS_OFFLOAD_READ_SEND/RECV. An actual offload fsctl is not implemented yet, neither in the VFS nor at the SMB ioctl layer, and returns NT_STATUS_NOT_IMPLEMENTED With these changes we now pass the copy-chunk-across-shares test. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-07-03s3/vfs: add SMB_VFS_OFFLOAD_READ_SEND/RECVRalph Boehme1-0/+222
Add SMB_VFS_OFFLOAD_READ_SEND an SMB_VFS_OFFLOAD_READ_RECV. This paves the way for supporting server-side copy-chunk with source and destination file-handles on different shares. It can be used to implement copy offload fsctl in the future, but for now this will be used as a mere copy-chunk replacement. SMB_VFS_OFFLOAD_READ generates a token that associates an fsp with the token and stores the fsp in a in-memory db. Initially only a copy-chunk resume key fsctl is supported. In the future this can be enhanced to support real offload fsctl. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>