[libvirt PATCH 00/11] Automatic mutex management

Tim Wiederhake posted 11 patches 2 years, 2 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
src/bhyve/bhyve_conf.c               |  7 +--
src/bhyve/bhyve_driver.c             | 12 ----
src/bhyve/bhyve_utils.h              |  3 -
src/ch/ch_conf.c                     | 31 +++++-----
src/ch/ch_conf.h                     | 10 ----
src/ch/ch_driver.c                   | 29 +++++----
src/libxl/libxl_conf.c               |  8 +--
src/libxl/libxl_conf.h               | 12 ----
src/libxl/libxl_logger.c             | 20 +++----
src/lxc/lxc_conf.c                   | 41 ++++++-------
src/lxc/lxc_conf.h                   |  9 ---
src/lxc/lxc_controller.c             | 25 ++++----
src/lxc/lxc_fuse.c                   | 12 ++--
src/network/bridge_driver.c          | 41 ++++---------
src/node_device/node_device_driver.c | 23 ++-----
src/node_device/node_device_udev.c   | 52 +++++++---------
src/util/virthreadpool.c             | 90 ++++++++--------------------
17 files changed, 138 insertions(+), 287 deletions(-)
[libvirt PATCH 00/11] Automatic mutex management
Posted by Tim Wiederhake 2 years, 2 months ago
Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
to simplify mutex management.

This made a solitary "virMutexUnlock()" call without previous call to
"virMutexLock()" in ch_driver.c obvious, which is removed in patch #8.

Tim Wiederhake (11):
  virthreadpool: Use automatic memory management
  virthreadpool: Cleanup
  libxl: Use automatic memory management
  lxc: Prepare virLXCDriverGetCapabilities for automatic mutex
    management
  lxc: Use automatic mutex management
  ch: Prepare virCHDriverGetCapabilities for automatic mutex management
  ch: Use automatic mutex management
  ch: Remove solitary virMutexUnlock
  network: Use automatic mutex management
  bhyve_driver: Use automatic mutex management
  node_device: Use automatic mutex management

 src/bhyve/bhyve_conf.c               |  7 +--
 src/bhyve/bhyve_driver.c             | 12 ----
 src/bhyve/bhyve_utils.h              |  3 -
 src/ch/ch_conf.c                     | 31 +++++-----
 src/ch/ch_conf.h                     | 10 ----
 src/ch/ch_driver.c                   | 29 +++++----
 src/libxl/libxl_conf.c               |  8 +--
 src/libxl/libxl_conf.h               | 12 ----
 src/libxl/libxl_logger.c             | 20 +++----
 src/lxc/lxc_conf.c                   | 41 ++++++-------
 src/lxc/lxc_conf.h                   |  9 ---
 src/lxc/lxc_controller.c             | 25 ++++----
 src/lxc/lxc_fuse.c                   | 12 ++--
 src/network/bridge_driver.c          | 41 ++++---------
 src/node_device/node_device_driver.c | 23 ++-----
 src/node_device/node_device_udev.c   | 52 +++++++---------
 src/util/virthreadpool.c             | 90 ++++++++--------------------
 17 files changed, 138 insertions(+), 287 deletions(-)

-- 
2.31.1


Re: [libvirt PATCH 00/11] Automatic mutex management
Posted by Michal Prívozník 2 years, 2 months ago
On 2/7/22 14:12, Tim Wiederhake wrote:
> Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD
> to simplify mutex management.
> 
> This made a solitary "virMutexUnlock()" call without previous call to
> "virMutexLock()" in ch_driver.c obvious, which is removed in patch #8.
> 
> Tim Wiederhake (11):
>   virthreadpool: Use automatic memory management
>   virthreadpool: Cleanup
>   libxl: Use automatic memory management
>   lxc: Prepare virLXCDriverGetCapabilities for automatic mutex
>     management
>   lxc: Use automatic mutex management
>   ch: Prepare virCHDriverGetCapabilities for automatic mutex management
>   ch: Use automatic mutex management
>   ch: Remove solitary virMutexUnlock
>   network: Use automatic mutex management
>   bhyve_driver: Use automatic mutex management
>   node_device: Use automatic mutex management
> 
>  src/bhyve/bhyve_conf.c               |  7 +--
>  src/bhyve/bhyve_driver.c             | 12 ----
>  src/bhyve/bhyve_utils.h              |  3 -
>  src/ch/ch_conf.c                     | 31 +++++-----
>  src/ch/ch_conf.h                     | 10 ----
>  src/ch/ch_driver.c                   | 29 +++++----
>  src/libxl/libxl_conf.c               |  8 +--
>  src/libxl/libxl_conf.h               | 12 ----
>  src/libxl/libxl_logger.c             | 20 +++----
>  src/lxc/lxc_conf.c                   | 41 ++++++-------
>  src/lxc/lxc_conf.h                   |  9 ---
>  src/lxc/lxc_controller.c             | 25 ++++----
>  src/lxc/lxc_fuse.c                   | 12 ++--
>  src/network/bridge_driver.c          | 41 ++++---------
>  src/node_device/node_device_driver.c | 23 ++-----
>  src/node_device/node_device_udev.c   | 52 +++++++---------
>  src/util/virthreadpool.c             | 90 ++++++++--------------------
>  17 files changed, 138 insertions(+), 287 deletions(-)
> 

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

And sorry for the conflict, but it's trivial enough to resolve.

Michal