[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-32-110-g974262b
Jeremy Allison
jra at samba.org
Tue Jan 13 19:26:12 GMT 2009
The branch, v3-0-test has been updated
via 974262ba3e8226ec9805d38e602ec8d083e44f72 (commit)
from b0f66f65e4d7cf0d70708783e5486fe3e1e5e8e8 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit 974262ba3e8226ec9805d38e602ec8d083e44f72
Author: Jeremy Allison <jra at samba.org>
Date: Tue Jan 13 11:24:24 2009 -0800
Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/lib/sendfile.c | 4 ++--
source/smbd/reply.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/sendfile.c b/source/lib/sendfile.c
index f4f6e16..4aa58c3 100644
--- a/source/lib/sendfile.c
+++ b/source/lib/sendfile.c
@@ -66,7 +66,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
@@ -144,7 +144,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/source/smbd/reply.c b/source/smbd/reply.c
index d8cbfd8..69a9885 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -2213,9 +2213,9 @@ void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T st
header.free = NULL;
if ( SMB_VFS_SENDFILE( smbd_server_fd(), fsp, fsp->fh->fd, &header, startpos, nread) == -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_readbraw;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list