[Libguestfs] [nbdkit PATCH 4/4] filters: Check for mutex failures

Eric Blake eblake at redhat.com
Wed Apr 24 22:29:03 UTC 2019


On 4/24/19 5:24 PM, Eric Blake wrote:
> Commit 975dab14 argued that for simple lock/unlock sequences, it was
> easier to avoid the cleanup.h macros. But since that time, we added
> additional sanity checking to the macros, at which point the
> boilerplate of inlining that sanity checking is outweighed compared to
> just using the macros in more places.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  filters/cache/cache.c         | 23 +++++++++++------------
>  filters/cow/cow.c             | 19 ++++++++-----------
>  filters/error/error.c         |  7 ++++---
>  filters/log/log.c             |  3 +--
>  filters/rate/rate.c           | 10 +++++-----
>  filters/readahead/readahead.c |  3 +--
>  filters/stats/stats.c         | 18 ++++++------------
>  filters/error/Makefile.am     |  5 ++++-
>  8 files changed, 40 insertions(+), 48 deletions(-)

I forgot to squash in:

diff --git i/filters/error/error.c w/filters/error/error.c
index 22ebd1c..add7566 100644
--- i/filters/error/error.c
+++ w/filters/error/error.c
@@ -45,6 +45,7 @@

 #include <nbdkit-filter.h>

+#include "cleanup.h"
 #include "random.h"

 #define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL

(Oddly enough, without that change, 'make' succeeds with status 0,
merely warning about an implicit symbol declaration rather than failing
the build, where it wasn't until 'make check' failing with .so failing
to find all symbols that I noticed the problem. That's a bit
disconcerting that we don't fail sooner in the build...)

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190424/1c279612/attachment.sig>


More information about the Libguestfs mailing list