summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/close.c2
-rw-r--r--source3/smbd/fileio.c26
-rw-r--r--source3/smbd/oplock.c2
-rw-r--r--source3/smbd/reply.c4
-rw-r--r--source3/smbd/vfs.c6
5 files changed, 20 insertions, 20 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 6153066018f..02babb7a9ef 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -148,7 +148,7 @@ static NTSTATUS close_filestruct(files_struct *fsp)
NTSTATUS status = NT_STATUS_OK;
if (fsp->fh->fd != -1) {
- if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) {
+ if(flush_write_cache(fsp, SAMBA_CLOSE_FLUSH) == -1) {
status = map_nt_error_from_unix(errno);
}
delete_write_cache(fsp);
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 96eb24b0732..9ac4ae41c16 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -82,7 +82,7 @@ ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n)
return n;
}
- flush_write_cache(fsp, READ_FLUSH);
+ flush_write_cache(fsp, SAMBA_READ_FLUSH);
fsp->fh->pos = pos;
@@ -379,13 +379,13 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
profile_p->writecache_read_hits ));
DEBUG(3,("WRITECACHE: Flushes SEEK=%d, READ=%d, WRITE=%d, READRAW=%d, OPLOCK=%d, CLOSE=%d, SYNC=%d\n",
- profile_p->writecache_flushed_writes[SEEK_FLUSH],
- profile_p->writecache_flushed_writes[READ_FLUSH],
- profile_p->writecache_flushed_writes[WRITE_FLUSH],
- profile_p->writecache_flushed_writes[READRAW_FLUSH],
- profile_p->writecache_flushed_writes[OPLOCK_RELEASE_FLUSH],
- profile_p->writecache_flushed_writes[CLOSE_FLUSH],
- profile_p->writecache_flushed_writes[SYNC_FLUSH] ));
+ profile_p->writecache_flushed_writes[SAMBA_SEEK_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_READ_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_WRITE_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_READRAW_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_OPLOCK_RELEASE_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_CLOSE_FLUSH],
+ profile_p->writecache_flushed_writes[SAMBA_SYNC_FLUSH] ));
}
#endif
@@ -393,7 +393,7 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
/* If we're using receivefile don't
* deal with a write cache.
*/
- flush_write_cache(fsp, WRITE_FLUSH);
+ flush_write_cache(fsp, SAMBA_WRITE_FLUSH);
delete_write_cache(fsp);
wcp = NULL;
}
@@ -689,7 +689,7 @@ nonop=%u allocated=%u active=%u direct=%u perfect=%u readhits=%u\n",
+-----------------------+--------+
*/
- flush_write_cache(fsp, WRITE_FLUSH);
+ flush_write_cache(fsp, SAMBA_WRITE_FLUSH);
wcp->offset = wcp->file_size;
wcp->data_size = pos - wcp->file_size + 1;
memset(wcp->data, '\0', wcp->data_size);
@@ -793,12 +793,12 @@ cache: fd = %d, off=%.0f, size=%u\n", fsp->fh->fd, (double)wcp->offset, (unsigne
}
if (cache_flush_needed) {
- DEBUG(3,("WRITE_FLUSH:%d: due to noncontinuous write: fd = %d, size = %.0f, pos = %.0f, \
+ DEBUG(3,("SAMBA_WRITE_FLUSH:%d: due to noncontinuous write: fd = %d, size = %.0f, pos = %.0f, \
n = %u, wcp->offset=%.0f, wcp->data_size=%u\n",
write_path, fsp->fh->fd, (double)wcp->file_size, (double)pos, (unsigned int)n,
(double)wcp->offset, (unsigned int)wcp->data_size ));
- flush_write_cache(fsp, WRITE_FLUSH);
+ flush_write_cache(fsp, SAMBA_WRITE_FLUSH);
}
}
@@ -1027,7 +1027,7 @@ NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_throug
if (lp_strict_sync(SNUM(conn)) &&
(lp_syncalways(SNUM(conn)) || write_through)) {
- int ret = flush_write_cache(fsp, SYNC_FLUSH);
+ int ret = flush_write_cache(fsp, SAMBA_SYNC_FLUSH);
if (ret == -1) {
return map_nt_error_from_unix(errno);
}
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 312855d22a5..02cd0bbc45b 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -114,7 +114,7 @@ static void release_file_oplock(files_struct *fsp)
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
- flush_write_cache(fsp, OPLOCK_RELEASE_FLUSH);
+ flush_write_cache(fsp, SAMBA_OPLOCK_RELEASE_FLUSH);
delete_write_cache(fsp);
TALLOC_FREE(fsp->oplock_timeout);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b160290345c..ffbfabbca51 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3390,7 +3390,7 @@ void reply_readbraw(struct smb_request *req)
return;
}
- flush_write_cache(fsp, READRAW_FLUSH);
+ flush_write_cache(fsp, SAMBA_READRAW_FLUSH);
startpos = IVAL_TO_SMB_OFF_T(req->vwv+1, 0);
if(req->wct == 10) {
@@ -4888,7 +4888,7 @@ void reply_lseek(struct smb_request *req)
return;
}
- flush_write_cache(fsp, SEEK_FLUSH);
+ flush_write_cache(fsp, SAMBA_SEEK_FLUSH);
mode = SVAL(req->vwv+1, 0) & 3;
/* NB. This doesn't use IVAL_TO_SMB_OFF_T as startpos can be signed in this case. */
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index ca6500cf8cc..de0cc972056 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -551,7 +551,7 @@ int vfs_allocate_file_space(files_struct *fsp, uint64_t len)
contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_ALLOC_SHRINK);
- flush_write_cache(fsp, SIZECHANGE_FLUSH);
+ flush_write_cache(fsp, SAMBA_SIZECHANGE_FLUSH);
if ((ret = SMB_VFS_FTRUNCATE(fsp, (off_t)len)) != -1) {
set_filelen_write_cache(fsp, len);
}
@@ -616,7 +616,7 @@ int vfs_set_filelen(files_struct *fsp, off_t len)
DEBUG(10,("vfs_set_filelen: ftruncate %s to len %.0f\n",
fsp_str_dbg(fsp), (double)len));
- flush_write_cache(fsp, SIZECHANGE_FLUSH);
+ flush_write_cache(fsp, SAMBA_SIZECHANGE_FLUSH);
if ((ret = SMB_VFS_FTRUNCATE(fsp, len)) != -1) {
set_filelen_write_cache(fsp, len);
notify_fname(fsp->conn, NOTIFY_ACTION_MODIFIED,
@@ -705,7 +705,7 @@ int vfs_fill_sparse(files_struct *fsp, off_t len)
contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_FILL_SPARSE);
- flush_write_cache(fsp, SIZECHANGE_FLUSH);
+ flush_write_cache(fsp, SAMBA_SIZECHANGE_FLUSH);
offset = fsp->fsp_name->st.st_ex_size;
num_to_write = len - fsp->fsp_name->st.st_ex_size;