summaryrefslogtreecommitdiff
path: root/source3/smbd/aio.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-05-27 11:24:14 +0200
committerJeremy Allison <jra@samba.org>2019-11-13 00:20:55 +0000
commit3fea05e01f845588eb0de63af435bfec670593be (patch)
tree91f3d63cf87fddc636b10af9095306fdbaba6beb /source3/smbd/aio.c
parenta0aaf5c3345239959221d6c2e9cd949b8ccdf233 (diff)
downloadsamba-3fea05e01f845588eb0de63af435bfec670593be.tar.gz
smbd: Remove write cache
Since this was written, our write path has changed significantly. In particular we have gained very flexible support for async I/O, with the linux io_uring in the pipeline. Caching stuff in main memory and then doing a blocking pwrite nowadays does not belong into the core smbd code. If someone wants it back, it should be doable in a VFS module. Removes: "write cache size" parameter. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 13 00:20:55 UTC 2019 on sn-devel-184
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r--source3/smbd/aio.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 8ac3ef7278e..0f824f5aa1f 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -172,9 +172,8 @@ NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
return NT_STATUS_RETRY;
}
- /* Only do this on non-chained and non-chaining reads not using the
- * write cache. */
- if (req_is_in_chain(smbreq) || (lp_write_cache_size(SNUM(conn)) != 0)) {
+ /* Only do this on non-chained and non-chaining reads */
+ if (req_is_in_chain(smbreq)) {
return NT_STATUS_RETRY;
}
@@ -428,9 +427,8 @@ NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
return NT_STATUS_RETRY;
}
- /* Only do this on non-chained and non-chaining writes not using the
- * write cache. */
- if (req_is_in_chain(smbreq) || (lp_write_cache_size(SNUM(conn)) != 0)) {
+ /* Only do this on non-chained and non-chaining writes */
+ if (req_is_in_chain(smbreq)) {
return NT_STATUS_RETRY;
}
@@ -673,11 +671,6 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
return NT_STATUS_RETRY;
}
- /* Only do this on reads not using the write cache. */
- if (lp_write_cache_size(SNUM(conn)) != 0) {
- return NT_STATUS_RETRY;
- }
-
if (smbd_smb2_is_compound(smbreq->smb2req)) {
return NT_STATUS_RETRY;
}
@@ -813,11 +806,6 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
return NT_STATUS_RETRY;
}
- /* Only do this on writes not using the write cache. */
- if (lp_write_cache_size(SNUM(conn)) != 0) {
- return NT_STATUS_RETRY;
- }
-
if (smbd_smb2_is_compound(smbreq->smb2req)) {
return NT_STATUS_RETRY;
}