[PATCH] call dm_lib_release/exit explicitly in multipath-tools
authorroot <root@xa-s05.(none)>
Mon, 16 May 2005 21:08:31 +0000 (23:08 +0200)
committerroot <root@xa-s05.(none)>
Mon, 16 May 2005 21:08:31 +0000 (23:08 +0200)
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

kpartx/kpartx.c
multipath/main.c

index 5d714bf..cf7eda9 100644 (file)
@@ -429,6 +429,9 @@ main(int argc, char **argv){
                if (n > 0)
                        break;
        }
+       dm_lib_release();
+       dm_lib_exit();
+
        return 0;
 }
 
index 5900cb6..e3c4c29 100644 (file)
@@ -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