The Samba-Bugzilla – Attachment 3871 Details for
Bug 6019
File corruption in Clustered SMB/NFS environment managed via CTDB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
look1 (text/plain), 1.66 KB, created by
Jeremy Allison
on 2009-01-13 13:17:14 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-01-13 13:17:14 UTC
Size:
1.66 KB
patch
obsolete
>diff --git a/source/lib/sendfile.c b/source/lib/sendfile.c >index d1b1785..fb10cae 100644 >--- a/source/lib/sendfile.c >+++ b/source/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/source/smbd/reply.c b/source/smbd/reply.c >index a613459..c192d4a 100644 >--- a/source/smbd/reply.c >+++ b/source/smbd/reply.c >@@ -3230,9 +3230,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; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6019
:
3861
|
3865
| 3871