From: Volker Lendecke Date: Tue, 19 Feb 2008 12:27:08 +0000 (+0100) Subject: Update position information also for AIO X-Git-Tag: samba-3.2.0pre2~37^2~160^2~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2ca12c2345c0e3916dd09d097b2ba1ce2989fa8;p=thirdparty%2Fsamba.git Update position information also for AIO Necessary to survive RAW-SEEK with AIO enabled. Jeremy, please check! --- diff --git a/source/smbd/aio.c b/source/smbd/aio.c index 5515582eecc..8c6eaf1498f 100644 --- a/source/smbd/aio.c +++ b/source/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);