[SCM] Samba Shared Repository - branch v4-3-test updated
Karolin Seeger
kseeger at samba.org
Mon Sep 19 13:18:03 UTC 2016
The branch, v4-3-test has been updated
via 6a8400e smbd: Reset O_NONBLOCK on open files
from 5bad77f vfs_acl_common: use DBG_LEVEL and remove function prefixes in DEBUG statements
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test
- Log -----------------------------------------------------------------
commit 6a8400e620cd326cebd7d64de891848f1d5808a1
Author: Volker Lendecke <vl at samba.org>
Date: Mon Aug 29 09:58:45 2016 +0200
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 at samba.org>
Reviewed-by: Simo <simo at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Thu Sep 15 20:21:41 CEST 2016 on sn-devel-144
(cherry picked from commit e69b17d603e5f09ac1e7ee05fc1f5ad67288c484)
Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-3-test): Mon Sep 19 15:17:06 CEST 2016 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/open.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Changeset truncated at 500 lines:
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. */
--
Samba Shared Repository
More information about the samba-cvs
mailing list