The branch, v4-4-test has been updated
       via  aa45e1a smbd: Reset O_NONBLOCK on open files
       via  1324acb ctdb-recovery: Terminate if recovery fails without any 
banning credits
      from  e4e5018 ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control 
request

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-4-test


- Log -----------------------------------------------------------------
commit aa45e1a88c0f3eee254f4445be95484bd7ef043e
Author: Volker Lendecke <v...@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 <v...@samba.org>
    Reviewed-by: Simo <s...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@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-4-test): Karolin Seeger <ksee...@samba.org>
    Autobuild-Date(v4-4-test): Mon Sep 19 13:44:01 CEST 2016 on sn-devel-144

commit 1324acbe6de7cf3a98deeecd89975bf911fa6070
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Jun 23 21:07:37 2016 +1000

    ctdb-recovery: Terminate if recovery fails without any banning credits
    
    In case of database recovery failure, if there are no banning credits
    assigned, then the async computation is never terminated.  The else
    condition is missing in (max_credits >= NUM_RETRIES) check.
    
    Signed-off-by: Amitay Isaacs <ami...@gmail.com>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    
    Autobuild-User(master): Martin Schwenke <mart...@samba.org>
    Autobuild-Date(master): Fri Jun 24 09:56:23 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 600cec4d44a01391230a81efeece5155a97c8298)

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

Summary of changes:
 ctdb/server/ctdb_recovery_helper.c |  2 ++
 source3/smbd/open.c                | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_recovery_helper.c 
b/ctdb/server/ctdb_recovery_helper.c
index 24aa42f..086dd16 100644
--- a/ctdb/server/ctdb_recovery_helper.c
+++ b/ctdb/server/ctdb_recovery_helper.c
@@ -2609,6 +2609,8 @@ static void recovery_db_recovery_done(struct tevent_req 
*subreq)
                        }
                        tevent_req_set_callback(subreq, recovery_failed_done,
                                                req);
+               } else {
+                       tevent_req_error(req, EIO);
                }
                return;
        }
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 5935ff5..90155bd 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -883,6 +883,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

Reply via email to