The Samba-Bugzilla – Attachment 12473 Details for
Bug 12268
Files opened with O_NONLOCK can return ETIMEDOUT on pread
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
12268.patch (text/plain), 1.52 KB, created by
Volker Lendecke
on 2016-09-16 21:29:10 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2016-09-16 21:29:10 UTC
Size:
1.52 KB
patch
obsolete
>From 57c0072d2aea27917ba0d06ad7421503948e9aa6 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Mon, 29 Aug 2016 09:58:45 +0200 >Subject: [PATCH] smbd: Reset O_NONBLOCK on open files > >See the comment inline :-) > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12268 >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Simo <simo@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Thu Sep 15 20:21:41 CEST 2016 on sn-devel-144 > >(cherry picked from commit e69b17d603e5f09ac1e7ee05fc1f5ad67288c484) >--- > source3/smbd/open.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > >diff --git a/source3/smbd/open.c b/source3/smbd/open.c >index 590561e..38fef79 100644 >--- a/source3/smbd/open.c >+++ b/source3/smbd/open.c >@@ -882,6 +882,25 @@ static NTSTATUS open_file(files_struct *fsp, > return status; > } > >+ if (local_flags & O_NONBLOCK) { >+ /* >+ * GPFS can return ETIMEDOUT for pread on >+ * nonblocking file descriptors when files >+ * migrated to tape need to be recalled. I >+ * could imagine this happens elsehwere >+ * too. With blocking file descriptors this >+ * does not happen. >+ */ >+ ret = set_blocking(fsp->fh->fd, true); >+ if (ret == -1) { >+ status = map_nt_error_from_unix(errno); >+ DBG_WARNING("Could not set fd to blocking: " >+ "%s\n", strerror(errno)); >+ fd_close(fsp); >+ return status; >+ } >+ } >+ > ret = SMB_VFS_FSTAT(fsp, &smb_fname->st); > if (ret == -1) { > /* If we have an fd, this stat should succeed. */ >-- >2.1.4 >
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
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 12268
: 12473