[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Dec 14 19:27:01 MST 2010


The branch, master has been updated
       via  12e49a7 Protect the onefs sendfile from EAGAIN/EWOULDBLOCK.
      from  a8eed18 Implement "use sendfile = yes" for SMB2. (cherry picked from commit 95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1)

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


- Log -----------------------------------------------------------------
commit 12e49a748c26697fb6f697512babb949a6c2931f
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Dec 14 17:35:29 2010 -0800

    Protect the onefs sendfile from EAGAIN/EWOULDBLOCK.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Wed Dec 15 03:26:43 CET 2010 on sn-devel-104

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

Summary of changes:
 source3/modules/onefs_system.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index 33bec26..94b5da2 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -269,7 +269,11 @@ static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd,
 		do {
 			ret = sendfile(fromfd, tofd, offset, total, &hdr,
 				       &nwritten, flags);
-		} while (ret == -1 && errno == EINTR);
+#if defined(EWOULDBLOCK)
+		} while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
+#else
+		} while (ret == -1 && (errno == EINTR || errno == EAGAIN));
+#endif
 
 		/* On error we're done. */
 		if (ret == -1) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list