[libvirt PATCH v2 00/13] Automatic mutex management - part 4

Tim Wiederhake posted 13 patches 2 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220316221042.97147-1-twiederh@redhat.com
Test syntax-check failed
There is a newer version of this series
src/conf/nwfilter_ipaddrmap.c          |  80 ++---
src/conf/virnwfilterobj.h              |   1 -
src/nwfilter/nwfilter_dhcpsnoop.c      | 396 ++++++++-----------------
src/nwfilter/nwfilter_driver.c         | 175 +++++------
src/nwfilter/nwfilter_gentech_driver.c |  33 +--
src/nwfilter/nwfilter_learnipaddr.c    |  83 ++----
src/qemu/qemu_conf.c                   |  70 ++---
src/remote/remote_daemon_stream.c      |  34 +--
src/util/virnetlink.c                  | 226 +++++++-------
9 files changed, 423 insertions(+), 675 deletions(-)
[libvirt PATCH v2 00/13] Automatic mutex management - part 4
Posted by Tim Wiederhake 2 years, 1 month ago
Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
to simplify mutex management.

V1: https://listman.redhat.com/archives/libvir-list/2022-March/229144.html

Changes since V1:
* Renamed mutex in nwfilter_driver.c
* Removed all instances where a lock guard had to be initialized with NULL
  (i.e. referencing no mutex).

Tim Wiederhake (13):
  nwfilter_driver: Statically initialize mutex
  nwfilter_driver: Split up nwfilterStateCleanup
  nwfilter_driver: Use automatic mutex management
  nwfilter_gentech: Use automatic mutex management
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopActiveLock macros
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopLock macros
  nwfilter_dhcpsnoop: Replace virNWFilterSnoopReqLock functions
  nwfilter_learnipaddr: Use automatic mutex management
  nwfilter_ipaddrmap: Use automatic mutex management
  virNetlinkEventAddClient: Remove goto
  virnetlink: Use automatic memory management
  remote_daemon_stream: Use automatic memory management
  qemu_conf: Use automatic memory management

 src/conf/nwfilter_ipaddrmap.c          |  80 ++---
 src/conf/virnwfilterobj.h              |   1 -
 src/nwfilter/nwfilter_dhcpsnoop.c      | 396 ++++++++-----------------
 src/nwfilter/nwfilter_driver.c         | 175 +++++------
 src/nwfilter/nwfilter_gentech_driver.c |  33 +--
 src/nwfilter/nwfilter_learnipaddr.c    |  83 ++----
 src/qemu/qemu_conf.c                   |  70 ++---
 src/remote/remote_daemon_stream.c      |  34 +--
 src/util/virnetlink.c                  | 226 +++++++-------
 9 files changed, 423 insertions(+), 675 deletions(-)

-- 
2.31.1

Re: [libvirt PATCH v2 00/13] Automatic mutex management - part 4
Posted by Michal Prívozník 2 years, 1 month ago
On 3/16/22 23:10, Tim Wiederhake wrote:
> Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
> to simplify mutex management.
> 
> V1: https://listman.redhat.com/archives/libvir-list/2022-March/229144.html
> 
> Changes since V1:
> * Renamed mutex in nwfilter_driver.c
> * Removed all instances where a lock guard had to be initialized with NULL
>   (i.e. referencing no mutex).
> 
> Tim Wiederhake (13):
>   nwfilter_driver: Statically initialize mutex
>   nwfilter_driver: Split up nwfilterStateCleanup
>   nwfilter_driver: Use automatic mutex management
>   nwfilter_gentech: Use automatic mutex management
>   nwfilter_dhcpsnoop: Replace virNWFilterSnoopActiveLock macros
>   nwfilter_dhcpsnoop: Replace virNWFilterSnoopLock macros
>   nwfilter_dhcpsnoop: Replace virNWFilterSnoopReqLock functions
>   nwfilter_learnipaddr: Use automatic mutex management
>   nwfilter_ipaddrmap: Use automatic mutex management
>   virNetlinkEventAddClient: Remove goto
>   virnetlink: Use automatic memory management
>   remote_daemon_stream: Use automatic memory management
>   qemu_conf: Use automatic memory management
> 
>  src/conf/nwfilter_ipaddrmap.c          |  80 ++---
>  src/conf/virnwfilterobj.h              |   1 -
>  src/nwfilter/nwfilter_dhcpsnoop.c      | 396 ++++++++-----------------
>  src/nwfilter/nwfilter_driver.c         | 175 +++++------
>  src/nwfilter/nwfilter_gentech_driver.c |  33 +--
>  src/nwfilter/nwfilter_learnipaddr.c    |  83 ++----
>  src/qemu/qemu_conf.c                   |  70 ++---
>  src/remote/remote_daemon_stream.c      |  34 +--
>  src/util/virnetlink.c                  | 226 +++++++-------
>  9 files changed, 423 insertions(+), 675 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal