[Libguestfs] [PATCH libldm 00/12] New API: an ability to retrieve created device-mapper devices back after they have been created.

Mykola Ivanets stenavin at gmail.com
Tue May 15 20:38:07 UTC 2018


The main goal of these patch series is to implement a new API that allows to retrieve created device-mapper devices for volumes and partitions back after they have been created.

As part of this patch:
- required libdevmapper version was bumped to 1.02.  I think it is safe because it was released more then 10 years ago;
- newer version of libdevmapper allowed to simplify code base a little bit;
- libdevmapper (and a good practice) suggest using UUID for device-mapper devices. It is get implemented as well. Presence of device UUID allows to use libevmapper API function to find device node easier;
- misc fixes and improvements.

IMPORTANT: These patch series depends on this one: https://www.redhat.com/archives/libguestfs/2018-May/msg00059.html.

NOTE: I tried to look around and follow project code style but it seems inconsistent or I simply was unable to recognize used code style.  Any comments re welcomed.

--
  Mykola Ivanets

Mykola Ivanets (12):
  Requires libdevmapper v1.02.
  Change the way we sanitise LDM partition name.
  Clarify ldm_volume_dm_get_name function documentation.
  Set UUID for device mapper devices (partitions and volumes).
  Fix potential memory leak.
  Use device mapper device UUID instead of name to find device in a
    tree.
  refactoring: search for device-mapper node in tree.
  Don't use hard-coded path to a device mapper directory.
  Move devmapper logging functionality into a single place.
  misc: don't make unnecessary functions calls, return correct result.
  New API: ldm_volume_dm_get_device
  New API: ldm_partition_dm_get_device

 configure.ac                       |   2 +-
 docs/reference/ldmtool/ldmtool.xml |  20 ++
 ldm-1.0.pc.in                      |   2 +-
 libldm.spec.in                     |   2 +-
 src/ldm.c                          | 379 ++++++++++++++++++++---------
 src/ldm.h                          |  31 ++-
 src/ldmtool.c                      |  74 ++++--
 test/ldmread.c                     |  34 ++-
 8 files changed, 392 insertions(+), 152 deletions(-)

-- 
2.17.0




More information about the Libguestfs mailing list