[SCM] Samba Shared Repository - branch master updated - 83c3b2809636cab704a54c2d699a907c6d07d199

Jeremy Allison jra at samba.org
Tue Jan 13 19:20:21 GMT 2009


The branch, master has been updated
       via  83c3b2809636cab704a54c2d699a907c6d07d199 (commit)
      from  4f079fe539ea3f41c5a9888279a6574760004098 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 83c3b2809636cab704a54c2d699a907c6d07d199
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 13 11:19:11 2009 -0800

    Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/sendfile.c |    4 ++--
 source3/smbd/reply.c   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index d1b1785..fb10cae 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -65,7 +65,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
 #endif
 		} while (nwritten == -1 && errno == EINTR);
 		if (nwritten == -1) {
-			if (errno == ENOSYS) {
+			if (errno == ENOSYS || errno == EINVAL) {
 				/* Ok - we're in a world of pain here. We just sent
 				 * the header, but the sendfile failed. We have to
 				 * emulate the sendfile at an upper layer before we
@@ -143,7 +143,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
 			nwritten = sendfile(tofd, fromfd, &small_offset, small_total);
 		} while (nwritten == -1 && errno == EINTR);
 		if (nwritten == -1) {
-			if (errno == ENOSYS) {
+			if (errno == ENOSYS || errno == EINVAL) {
 				/* Ok - we're in a world of pain here. We just sent
 				 * the header, but the sendfile failed. We have to
 				 * emulate the sendfile at an upper layer before we
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 24f6cd3..96fb939 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3179,9 +3179,9 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
 		setup_readX_header((char *)headerbuf, smb_maxcnt);
 
 		if ((nread = SMB_VFS_SENDFILE(smbd_server_fd(), fsp, &header, startpos, smb_maxcnt)) == -1) {
-			/* Returning ENOSYS or EINVAL means no data at all was sent. 
+			/* Returning ENOSYS means no data at all was sent.
 			   Do this as a normal read. */
-			if (errno == ENOSYS || errno == EINVAL) {
+			if (errno == ENOSYS) {
 				goto normal_read;
 			}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list