[SCM] CTDB repository - branch master updated - ctdb-1.12-155-gd0f8547

Ronnie Sahlberg sahlberg at samba.org
Wed Jan 4 03:42:22 MST 2012


The branch, master has been updated
       via  d0f85478c37828eb8a24315d4326eb4eaedb9afc (commit)
      from  15d8ae8b0f80f95d7839528b8ac60aa0e2485c77 (commit)

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


- Log -----------------------------------------------------------------
commit d0f85478c37828eb8a24315d4326eb4eaedb9afc
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jan 4 21:41:12 2012 +1100

    explain why we use FIONREAD

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

Summary of changes:
 common/ctdb_io.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_io.c b/common/ctdb_io.c
index 86e54e0..810fd41 100644
--- a/common/ctdb_io.c
+++ b/common/ctdb_io.c
@@ -78,6 +78,12 @@ static void queue_io_read(struct ctdb_queue *queue)
 	ssize_t nread;
 	uint8_t *data;
 
+	/* check how much data is available on the socket for immediately
+	   guaranteed nonblocking access.
+	   as long as we are careful never to try to read more than this
+	   we know all reads will be successful and will neither block
+	   nor fail with a "data not available right now" error
+	*/
 	if (ioctl(queue->fd, FIONREAD, &num_ready) != 0) {
 		return;
 	}


-- 
CTDB repository


More information about the samba-cvs mailing list