diff options
author | Jeremy Allison <jra@samba.org> | 2007-06-15 19:24:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:23 -0500 |
commit | cc35d1300d487c65f1dc8a275140701ba276adaf (patch) | |
tree | b60ade00d9273c5fc68c50dbb22974d4733ae85b /source3/smbd/aio.c | |
parent | 43d59b7d420c3d3e67d98fabac2fe18403f75f4e (diff) | |
download | samba-cc35d1300d487c65f1dc8a275140701ba276adaf.tar.gz samba-cc35d1300d487c65f1dc8a275140701ba276adaf.tar.xz samba-cc35d1300d487c65f1dc8a275140701ba276adaf.zip |
r23508: Fix sync_file() to return NTSTATUS and return this
on failure in the write path.
Jeremy.
(This used to be commit cd3f7dbee809fb40194af0e7509142166e02b252)
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index bee6ebc89a9..f747cf5c065 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -468,6 +468,7 @@ static int handle_aio_write_complete(struct aio_extra *aio_ex) ret = errno; } else { BOOL write_through = BITSETW(aio_ex->inbuf+smb_vwv7,0); + NTSTATUS status; SSVAL(outbuf,smb_vwv2,nwritten); SSVAL(outbuf,smb_vwv4,(nwritten>>16)&1); @@ -478,7 +479,13 @@ static int handle_aio_write_complete(struct aio_extra *aio_ex) DEBUG(3,("handle_aio_write: fnum=%d num=%d wrote=%d\n", fsp->fnum, (int)numtowrite, (int)nwritten)); - sync_file(fsp->conn,fsp, write_through); + status = sync_file(fsp->conn,fsp, write_through); + if (!NT_STATUS_IS_OK(status)) { + UNIXERROR(ERRHRD,ERRdiskfull); + ret = errno; + DEBUG(5,("handle_aio_write: sync_file for %s returned %s\n", + fsp->fsp_name, nt_errstr(status) )); + } } show_msg(outbuf); |