[SCM] CTDB repository - branch master updated - 2e0deb561088c0b162e9c6e50a47c63fb831ee52

Andrew Tridgell tridge at samba.org
Wed Feb 3 21:37:08 MST 2010


The branch, master has been updated
  discards  e459a947395e9aba50eba6cbf8f13ee803856314 (commit)
  discards  a46cb23168e83f818097c5f66bec7edee501250b (commit)
  discards  46cd20ebe9b0933ba663dad342661a7dc0a3926f (commit)
       via  2e0deb561088c0b162e9c6e50a47c63fb831ee52 (commit)
       via  ba656785f9685954bf84ff2ff6ec51cc59c91f54 (commit)
       via  d14f81fab7d62eee1af2a7bfbac04b6926ca60c3 (commit)
      from  e459a947395e9aba50eba6cbf8f13ee803856314 (commit)

http://gitweb.samba.org/?p=tridge/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2e0deb561088c0b162e9c6e50a47c63fb831ee52
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Feb 4 14:36:14 2010 +1100

    ctdb: when we fill the client packet queue we need to drop the client
    
    We can't just drop packets to the list, as those packets could be part
    of the core protocol the client is using. This happens (for example)
    when Samba is doing a traverse. If we drop a traverse packet then
    Samba hangs indefinately. We are better off dropping the ctdb socket
    to Samba.

commit ba656785f9685954bf84ff2ff6ec51cc59c91f54
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Feb 4 14:14:18 2010 +1100

    ctdb: move ctdb_io.c to use TLIST_*() macros
    
    This will make large packet queues much more efficient

commit d14f81fab7d62eee1af2a7bfbac04b6926ca60c3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Feb 4 14:13:49 2010 +1100

    util: added TLIST_*() macros
    
    The TLIST_*() macros are like the DLIST_*() macros, but take both a
    head and tail pointer for the list. This means that adding an element
    to the end of the list is efficient (it doesn't need to walk the
    list).
    
    We should move all uses of the DLIST_*() macros which use
    DLIST_ADD_END() to use the TLIST_*() macros instead.

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

Summary of changes:
 common/ctdb_io.c     |    2 +-
 lib/util/dlinklist.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 64e1872..3fa784d 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -194,7 +194,7 @@ static void queue_io_write(struct ctdb_queue *queue)
 		if (n == -1 && errno != EAGAIN && errno != EWOULDBLOCK) {
 			if (pkt->length != pkt->full_length) {
 				/* partial packet sent - we have to drop it */
-				TLIST_REMOVE(queue->out_queue, queue->out_queue_tail, 
+				TLIST_REMOVE(queue->out_queue, queue->out_queue_tail,
 					     pkt);
 				queue->out_queue_length--;
 				talloc_free(pkt);
diff --git a/lib/util/dlinklist.h b/lib/util/dlinklist.h
index c877537..44747d6 100644
--- a/lib/util/dlinklist.h
+++ b/lib/util/dlinklist.h
@@ -110,11 +110,11 @@ do { \
 		} \
 } while (0)
 
-/* 
+/*
    The TLIST_*() macros are meant for when you have two list pointers,
    one pointing at the head of the list and one pointing at the tail
    of the list. This makes the common case of adding to the end of the
-   list and removing from the front of the list efficient 
+   list and removing from the front of the list efficient
 
    TLIST stands for "tailed list"
 


-- 
CTDB repository


More information about the samba-cvs mailing list