[PATCH] Cleanups and bug fix for 13042
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Sep 26 06:05:37 UTC 2017
On Tue, Sep 26, 2017 at 01:35:43PM +1000, Amitay Isaacs wrote:
> Reviewed-by: Amitay Isaacs <amitay at gmail.com>
Thanks!
> Minor nitpick --
> The compilation warnings are from ctdbd.c and ctdb_daemon.c (nested event
> loop).
> There should not be any compilation warnings from ctdb.c. If you find any,
> please let me know.
When compiling with clang you get many warnings of the following type:
[2885/4321] Compiling ctdb/tools/ctdb.c
../ctdb/server/ctdb_daemon.c:136:40: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
if (ctdb_queue_length(client->queue) > client->ctdb->tunable.max_queue_depth_drop_msg) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That should be easy to fix. Not so easy to fix is:
../ctdb/server/ctdb_daemon.c:158:6: warning: cast from 'struct ctdb_req_header *' to 'struct ctdb_req_message_old *' increases required alignment from 4 to 8 [-Wcast-align]
r = ctdbd_allocate_pkt(client->ctdb, client->ctdb, CTDB_REQ_MESSAGE,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../ctdb/include/ctdb_client.h:65:2: note: expanded from macro 'ctdbd_allocate_pkt'
(type *)_ctdbd_allocate_pkt(ctdb, mem_ctx, operation, length, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
which on x86_64 is a performance issue if at all. If we still had
sparc, this would be a real problem.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list