summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-19 13:27:08 +0100
committerVolker Lendecke <vl@samba.org>2008-02-19 16:19:49 +0100
commit4c4c1bfb798aafa5a338a821456bae75e4753da1 (patch)
tree50658acadff01adcb67f263e071caafcd5ec97ae /source3
parente12cd305dd9d383058d5bdfa805078735c8018e3 (diff)
downloadsamba-4c4c1bfb798aafa5a338a821456bae75e4753da1.tar.gz
samba-4c4c1bfb798aafa5a338a821456bae75e4753da1.tar.bz2
samba-4c4c1bfb798aafa5a338a821456bae75e4753da1.zip
Update position information also for AIO
Necessary to survive RAW-SEEK with AIO enabled. Jeremy, please check! (This used to be commit e2ca12c2345c0e3916dd09d097b2ba1ce2989fa8)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/aio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 5515582eec..8c6eaf1498 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -423,6 +423,9 @@ static int handle_aio_read_complete(struct aio_extra *aio_ex)
SSVAL(outbuf,smb_vwv7,((nread >> 16) & 1));
SSVAL(smb_buf(outbuf),-2,nread);
+ aio_ex->fsp->fh->pos = aio_ex->acb.aio_offset + nread;
+ aio_ex->fsp->fh->position_information = aio_ex->fsp->fh->pos;
+
DEBUG( 3, ( "handle_aio_read_complete file %s max=%d "
"nread=%d\n",
aio_ex->fsp->fsp_name,
@@ -524,6 +527,8 @@ static int handle_aio_write_complete(struct aio_extra *aio_ex)
DEBUG(5,("handle_aio_write: sync_file for %s returned %s\n",
fsp->fsp_name, nt_errstr(status) ));
}
+
+ aio_ex->fsp->fh->pos = aio_ex->acb.aio_offset + nwritten;
}
show_msg(outbuf);