Ignore:
Timestamp:
Apr 9, 2010, 3:51:41 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.5.x: trunk update to 3.5.2

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/smbd/blocking.c

    r414 r429  
    7373        struct blocking_lock_record *blr;
    7474        struct timeval next_timeout;
     75        int max_brl_timeout = lp_parm_int(-1, "brl", "recalctime", 5);
    7576
    7677        TALLOC_FREE(brl_timeout);
     
    99100                DEBUG(10, ("Next timeout = Infinite.\n"));
    100101                return True;
     102        }
     103
     104        /*
     105         to account for unclean shutdowns by clients we need a
     106         maximum timeout that we use for checking pending locks. If
     107         we have any pending locks at all, then check if the pending
     108         lock can continue at least every brl:recalctime seconds
     109         (default 5 seconds).
     110
     111         This saves us needing to do a message_send_all() in the
     112         SIGCHLD handler in the parent daemon. That
     113         message_send_all() caused O(n^2) work to be done when IP
     114         failovers happened in clustered Samba, which could make the
     115         entire system unusable for many minutes.
     116        */
     117
     118        if (max_brl_timeout > 0) {
     119                struct timeval min_to = timeval_current_ofs(max_brl_timeout, 0);
     120                next_timeout = timeval_min(&next_timeout, &min_to);             
    101121        }
    102122
Note: See TracChangeset for help on using the changeset viewer.