http://bugzilla.novell.com/show_bug.cgi?id=551827 http://bugzilla.novell.com/show_bug.cgi?id=551827#c5 cong meng <cmeng@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #5 from cong meng <cmeng@novell.com> 2010-01-25 06:47:31 UTC --- Fixed. The patch below has been summited to Base:System in OBS. Close it. Index: multipath-tools-0.4.8/libmultipath/devmapper.c =================================================================== --- multipath-tools-0.4.8.orig/libmultipath/devmapper.c +++ multipath-tools-0.4.8/libmultipath/devmapper.c @@ -951,14 +951,12 @@ dm_remove_partmaps (const char * mapname /* * and the multipath mapname and the part mapname start - * the same + * the same. + * -2: It's assumed that the last 2 characters are + * different between the logical partition name and the + * extended partition name at most. */ - !strncmp(names->name, mapname, strlen(mapname)) && - - /* - * and the opencount is 0 for us to allow removal - */ - !dm_get_opencount(names->name) && + !strncmp(names->name, mapname, strlen(mapname) - 2) && /* * and we can fetch the map table from the kernel @@ -974,6 +972,19 @@ dm_remove_partmaps (const char * mapname * then it's a kpartx generated partition. * remove it. */ + + /* + * if the opencount is not 0, maybe some other + * partitons depend on it. + */ + if (dm_get_opencount(names->name)) { + dm_remove_partmaps(names->name); + if (dm_get_opencount(names->name)) { + condlog(2, "%s: map in use", names->name); + goto out; + } + } + condlog(4, "partition map %s removed", names->name); dm_simplecmd_flush(DM_DEVICE_REMOVE, names->name); -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.