On Mon, Mar 28, 2011 at 02:45:36PM +0900, Simon Horman wrote:
> On Mon, Mar 28, 2011 at 07:29:12AM +0200, Willy Tarreau wrote:
> > Hi Simon,
> > 
> > On Mon, Mar 28, 2011 at 08:49:00AM +0900, Simon Horman wrote:
> > > Hi,
> > > 
> > > here is my latest round of patches for the master/worker code
> > > that I have been working on to allow haproxy to be restarted without
> > > dropping or refusing connections to existing proxies if possible.
> > > 
> > > These patches are available at
> > > 
> > >   git://github.com/horms/haproxy.git master
> > > 
> > > They apply on top of the previous patches that I have posted. If there
> > > is any confusion about this I am happy to repost all the patches.
> > 
> > Thank you for the update, I'll update my tree here. I have started
> > the review last week, but it takes a lot of time (I hardly have contiguous
> > time to spend on it).
> 
> I understand, its  a lot of change to digest.

Exactly. In fact, I've already read all the patches individually, but
as you know, reviewing in context in the "hope" to catch possible side
effects is quite a different thing.

When the review work is finished, what I plan to do is to try to remege
a few patches (mainly the ones which we changed afterwards, such as adding
libcap then reverting it). I'd also like to make a cosmetic change, which
consists in renaming "master_worker" to "master-worker", as I'm trying to
get rid of underscores in new param names. I found them to be not-so-common
among non-developers and some people are confused with them...

> > BTW, I have two minor build fixes for less-recent gccs, do you want them
> > so that you can get them into your tree ? They're dirty right now, it was
> > to help me progress on the review.
> 
> Sure, if it helps you I can put them in my tree.

Fine, please find them attached.

> > > The highlights of this patch series is
> > > * Run master process as a privileged process and run it outside the chroot
> > 
> > Cool, that's perfect. This will also allow us not to rely on libcap.
> > I already noticed that the build with libcap failed on several systems
> > I had around, either because they were too old or because libcap was
> > not installed.
> 
> The dependency on libcap should now be gone :-)

I've already noticed when reading patch 4 :-)

Thanks!
Willy

>From aedcca395bd65317d5d936d31ad8d465f5c08424 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <[email protected]>
Date: Sun, 20 Mar 2011 13:59:06 +0100
Subject: REVIEW: change offsetof to build on older gcc

__builtin_offsetof is a "recent" gcc addition. Also surround it with
ifndef because some headers already define it :-/

---
 src/fd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/fd.c b/src/fd.c
index 2d102c4..0e2cc1c 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -226,7 +226,9 @@ static void socket_cache_body_assign(struct socket_cache *e,
        e->maxseg = listener->maxseg;
 }
 
-#define offsetof(type, member)  __builtin_offsetof (type, member)
+#ifndef offsetof
+#define offsetof(type, member) ((size_t)&((type *)NULL)->member)
+#endif
 
 static int socket_cache_cmp(const struct socket_cache *a,
                            const struct socket_cache *b)
-- 
1.7.2.1.45.g54fbc

>From 452bdbea32f3ef200fd26fe286325bc3b4235ea9 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <[email protected]>
Date: Sun, 20 Mar 2011 14:12:40 +0100
Subject: REVIEW: use __va_copy for older versions of gcc

2.95 does not know about va_copy().
---
 src/log.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/log.c b/src/log.c
index 52a27a5..558a739 100644
--- a/src/log.c
+++ b/src/log.c
@@ -73,7 +73,7 @@ static void __Alert(int send_log, const char *fmt, va_list 
argp)
        if (!(global.mode & MODE_QUIET) || (global.mode & (MODE_VERBOSE | 
MODE_STARTING))) {
                if (send_log) {
                        va_list argp2;
-                       va_copy(argp2, argp);
+                       __va_copy(argp2, argp);
                        vsend_log(NULL, LOG_ERR, fmt, argp2);
                        va_end(argp2);
                }
@@ -134,7 +134,7 @@ void vWarning(const char *fmt, va_list argp)
        struct tm tm;
 
        if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
-               va_copy(argp2, argp);
+               __va_copy(argp2, argp);
                vsend_log(NULL, LOG_WARNING, fmt, argp2);
                va_end(argp2);
 
-- 
1.7.2.1.45.g54fbc

Reply via email to