call dm_lib_release/exit explicitly in multipath-tools
PATCH 1/1 call dm_lib_release/exit explicitly in multipath-tools
Hi Christophe,
multipath-tools should call dm_lib_release() and dm_lib_exit() before it returns. Then, libdevmapper will call update_devs() and finalize the device node operation which creates /dev/mapper/<map_name>.
This patch may not be needed if the latest libdevmapper of the device-mapper CVS is used, since in the latest version, dm_lib_exit() calls dm_lib_release() and dm_lib_exit() is called by default when the program returns.
Regards,
Kiyoshi Ueda
multipath/main.c 2005-05-16 12:34:41.000000000 -0400 renamed from multipath/main.c 2005-05-16 12:37:24.000000000 -0400 +2 -0
@@ -1004,6 +1004,8 @@ out: free_multipathvec(curmp, KEEP_PATHS); free_pathvec(pathvec, FREE_PATHS); free_config(conf); + dm_lib_release(); + dm_lib_exit(); #ifdef _DEBUG_ dbg_free_final(NULL); #endif
kpartx/kpartx.c 2005-05-16 12:36:36.000000000 -0400 renamed from kpartx/kpartx.c 2005-05-16 12:37:36.000000000 -0400 +4 -0
@@ -429,6 +429,10 @@ main(int argc, char **argv){ if (n > 0) break; } + + dm_lib_release(); + dm_lib_exit(); + return 0; }